๐ง
Linux Commands Cheat Sheet
Essential Linux command line reference for IT professionals
Showing 35 commands
| Command | Category | Syntax | Description | Common Flags |
|---|---|---|---|---|
| ls | Files | ls [options] [path] | List directory contents | -l (long), -a (all), -h (human) |
| cd | Navigation | cd [path] | Change directory | |
| pwd | Navigation | pwd | Print working directory | |
| mkdir | Files | mkdir [options] dir | Create directory | -p (parents) |
| rm | Files | rm [options] file | Remove files/dirs | -r (recursive), -f (force) |
| cp | Files | cp [options] src dest | Copy files/dirs | -r (recursive), -p (preserve) |
| mv | Files | mv src dest | Move or rename | |
| cat | Text | cat file | Display file contents | -n (line numbers) |
| grep | Text | grep pattern file | Search text patterns | -r (recursive), -i (ignore case) |
| find | Search | find path -name pattern | Find files | -type f/d, -mtime, -size |
| chmod | Permissions | chmod mode file | Change permissions | -R (recursive) |
| chown | Permissions | chown user:group file | Change ownership | -R (recursive) |
| ps | Process | ps [options] | List processes | a (all), u (user), x (no tty) |
| top | Process | top | Real-time process monitor | -d (delay) |
| kill | Process | kill [signal] PID | Send signal to process | -9 (SIGKILL), -15 (SIGTERM) |
| systemctl | Services | systemctl action service | Manage systemd services | start, stop, enable, status |
| journalctl | Logs | journalctl [options] | View systemd logs | -f (follow), -u (unit) |
| tail | Text | tail [options] file | Show last lines | -f (follow), -n (lines) |
| head | Text | head [options] file | Show first lines | -n (lines) |
| ssh | Network | ssh user@host | Secure shell connection | -i (identity), -p (port) |
| scp | Network | scp src user@host:dest | Secure copy | -r (recursive) |
| curl | Network | curl [options] URL | Transfer data from URL | -X (method), -d (data), -H (header) |
| wget | Network | wget URL | Download files | -O (output), -r (recursive) |
| netstat | Network | netstat [options] | Network statistics | -t (tcp), -u (udp), -l (listen) |
| ss | Network | ss [options] | Socket statistics | Replaces netstat |
| ip | Network | ip [object] [command] | IP configuration | addr, route, link |
| ping | Network | ping host | Test connectivity | -c (count) |
| traceroute | Network | traceroute host | Trace packet route | |
| df | Disk | df [options] | Disk space usage | -h (human readable) |
| du | Disk | du [options] path | Directory size | -s (summary), -h (human) |
| tar | Archive | tar [options] archive files | Archive files | -c (create), -x (extract), -z (gzip) |
| apt | Package | apt [command] [package] | Package manager (Debian) | install, remove, update |
| yum/dnf | Package | yum [command] [package] | Package manager (RHEL) | install, remove, update |
| nano | Editor | nano file | Simple text editor | |
| vim | Editor | vim file | Advanced text editor | :wq (save), :q! (quit) |