> For the complete documentation index, see [llms.txt](https://tech.keeganturner.co.za/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tech.keeganturner.co.za/how-to-guides/linux-basics-commands.md).

# Linux basics: commands

**Linux is an open-source operating system kernel used as the foundation for a wide range of operating systems, known as Linux distributions. It provides a robust and customizable environment for computing, suitable for diverse applications, from servers to personal devices. Linux supports multitasking, multiuser capabilities, and a secure, permission-based file system. It is widely employed in server environments due to its stability, security features, and efficiency. As a versatile and freely accessible operating system, Linux plays a crucial role in empowering developers, system administrators, and organizations to build and manage computing infrastructure.**

**Commands**

#### System Information

1. **`ls`** - List directory contents.
2. **`pwd`** - Print name of current/working directory.
3. **`cd`** - Change directory.
4. **`man`** - Display manual pages for commands.
5. **`uname`** - Print system information.

#### File Operations

6. **`cp`** - Copy files and directories.
7. **`mv`** - Move/rename files and directories.
8. **`rm`** - Remove/delete files or directories.
9. **`mkdir`** - Create directories.
10. **`rmdir`** - Remove empty directories.

#### Text Processing

11. **`cat`** - Concatenate and display files.
12. **`grep`** - Search for patterns in files.
13. **`sed`** - Stream editor for filtering and transforming text.
14. **`awk`** - Pattern scanning and text processing language.

#### File Viewing and Editing

15. **`less`** - View file contents interactively.
16. **`head`** - Output the first part of files.
17. **`tail`** - Output the last part of files.
18. **`nano`** - Terminal text editor.
19. **`vim`** - Powerful text editor.

#### Process Management

20. **`ps`** - Report a snapshot of the current processes.
21. **`top`** - Display and update sorted information about processes.
22. **`kill`** - Send signals to processes.

#### System Control

23. **`shutdown`** - Shutdown or restart the system.
24. **`reboot`** - Reboot the system.
25. **`halt`** - Halt the system.

#### Package Management

26. **`apt-get`** (or `apt` on newer systems) - Command-line tool for handling packages.
27. **`dpkg`** - Debian package manager.
28. **`yum`** - Package manager for RPM-based Linux distributions.

#### Network

29. **`ping`** - Send ICMP ECHO\_REQUEST to network hosts.
30. **`ifconfig`** - Configure network interfaces.
31. **`ssh`** - OpenSSH SSH client (remote login program).
32. **`scp`** - Secure copy (remote file copy program).

#### User Management

33. **`useradd`** - Create a new user or update default new user information.
34. **`userdel`** - Delete a user account and related files.
35. **`passwd`** - Update a user's authentication tokens.

#### Compression and Archiving

36. **`tar`** - Tape archive utility.
37. **`gzip`** - Compress or decompress files.
38. **`zip`** - Package and compress (archive) files.

#### Disk Usage

39. **`df`** - Report file system disk space usage.
40. **`du`** - Estimate file space usage.

#### Permissions

41. **`chmod`** - Change file mode bits (permissions).
42. **`chown`** - Change file owner and group.

#### Miscellaneous Utilities

43. **`date`** - Display or set the system date and time.
44. **`echo`** - Display a line of text/string.
45. **`wc`** - Print newline, word, and byte counts for each file.
46. **`find`** - Search for files in a directory hierarchy.

#### Environment

47. **`export`** - Set environment variables.
48. **`source`** - Execute commands from a file in the current shell.
49. **`alias`** - Create or list command aliases.
50. **`history`** - Command history list.

Each of these commands plays a crucial role in Linux system administration and daily usage, covering a wide range of tasks from basic file manipulation to system control and network management.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://tech.keeganturner.co.za/how-to-guides/linux-basics-commands.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
