SOME COMMANDS WITH THEIR EXAMPLES
📂 File and directory management
| Command | Description |
| cp | Copies files or folders. |
| mv | Moves or renames files or folders. |
| rm | Deletes files or folders ⚠️ Use with caution (rm -rf). |
| mkdir | Creates a new directory. |
| rmdir | Deletes an empty directory. |
| touch | Creates an empty file or updates its timestamp. |
| cat | Displays the full content of a file. |
| less / more | Displays file content page by page. |
| head / tail | Shows the first or last lines of a file. |
⚙️ System management
| Command | Description |
| sudo | Executes commands with superuser privileges. |
| apt / dnf / yum / pacman | Package managers depending on the distribution. |
| top / htop | Shows active processes and resource usage. |
| ps | Displays running processes. |
| kill | Terminates a process. |
| df | Shows free disk space. |
| du | Shows size of files or directories. |
| free | Displays RAM usage. |
| uname -a | Shows OS and kernel information. |
| uptime | Shows how long the system has been running. |
🌐 Network and connectivity
| Command | Description |
| ping | Checks connectivity with another machine. |
| ifconfig / ip a | Displays network configuration. |
| netstat / ss | Shows active connections and ports. |
| curl | Downloads or sends data from/to a URL. |
| wget | Downloads files from the web. |
| scp | Copies files between machines via SSH. |
| ssh | Connects to another machine via SSH. |
🔐 Users and permissions
| Command | Description |
| whoami | Shows the current user. |
| id | Shows user and group IDs. |
| chmod | Changes file permissions. |
| chown | Changes the owner of a file or folder. |
| adduser / useradd | Creates a new user. |
| passwd | Changes the user’s password. |
🧰 Miscellaneous utilities
| Command | Description |
| man | Shows the manual for a command. |
| history | Shows the command history. |
| grep | Searches for text inside files. |
| echo | Prints text or variables to the screen. |
| date | Shows or sets date and time. |
| tar | Compresses or extracts .tar or .tar.gz files. |
| zip / unzip | Compresses or extracts ZIP files. |