Linux Commands
Linux Commands
50 DevOps Essentials
Navigation & BasicsFile OperationsFile Viewing & EditingText ProcessingFinding ThingsCompression & ArchivesSystem InfoProcesses & ServicesNetworkingPermissions & UsersKeyboard Shortcuts
Navigation & Basics
| Command | Description |
|---|---|
| ls | List directory contents |
| ll | Long listing (with permissions) |
| cd | Change directory |
| pwd | Print working directory |
File Operations
| Command | Description |
|---|---|
| mkdir | Make directory |
| rmdir | Remove empty directory |
| rm | Remove files or directories |
| cp | Copy files or directories |
| mv | Move or rename files/directories |
| touch | Create an empty file / update timestamp |
File Viewing & Editing
| Command | Description |
|---|---|
| cat | Display file contents |
| less | View file contents interactively |
| head | Show first 10 lines of a file |
| tail | Show last 10 lines of a file |
| nano | Text editor (nano) |
| vi / vim | Text editor (vi/vim) |
Text Processing
| Command | Description |
|---|---|
| grep | Search text in files |
| echo | Print text to terminal |
| > | Redirect output to a file |
| >> | Append output to a file |
| | | Pipe one command output to another |
Finding Things
| Command | Description |
|---|---|
| find | Find files in directory hierarchy |
| locate | Find files by name (quick search) |
| which | Locate command or binary |
| whereis | Locate binary, source, man page |
Compression & Archives
| Command | Description |
|---|---|
| tar | Create / extract tar archives |
| gzip / gunzip | Compress / decompress files |
| zip / unzip | Compress / decompress zip files |
System Info
| Command | Description |
|---|---|
| df | Disk space usage |
| du | Disk usage of files/directories |
| free | Memory usage |
| top | Real-time process monitoring |
| htop | Interactive process viewer |
Processes & Services
| Command | Description |
|---|---|
| ps | Process status (e.g. ps -ef) |
| kill | Terminate a process (e.g. kill -9 <PID>) |
| systemctl | Manage systemd services |
| service | Manage services (SysV) |
Networking
| Command | Description |
|---|---|
| netstat | Network connections (netstat -tulnp) |
| ss | Socket statistics — modern netstat |
| ip | Show/modify network interfaces (ip a) |
| ping | Test connectivity |
| curl | Transfer data from URLs |
| wget | Download files from the web |
| ssh | Secure shell to remote host |
| scp | Secure copy files to remote host |
Permissions & Users
| Command | Description |
|---|---|
| chmod | Change file permissions |
| chown | Change file owner/group |
| useradd | Add a new user |
| usermod | Modify user account |
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
| Tab | Auto-complete |
| Ctrl + C | Cancel |
| Ctrl + Z | Suspend |
| Ctrl + D | Logout / exit |