The Ultimate Linux Command Cheat Sheet
A curated, high-density reference guide covering 100+ essential Linux commands, chmod octal permission matrices, grep regex patterns, and bash shortcuts. Click "Run in Sandbox ⚡" to test any command instantly in browser.
#1. Navigation & Directory Traversal
Essential commands for moving through the Linux Filesystem Hierarchy.
Print current working directory absolute path
List all files including hidden dotfiles in detailed format
Navigate up one parent directory level
Jump directly to user home directory
Display directory structure as a visual tree up to 2 levels
Locate executable binary path in system PATH
#2. File & Directory Operations
Creating, copying, moving, viewing, and deleting files and folders safely.
Create empty file or update timestamp
Create parent and sub-directories in a single command
Copy directory recursively with all subfolders and contents
Move or rename files and directories
Forcefully and recursively remove directory (use with extreme care)
Concatenate and print file contents to terminal stdout
Output first 20 lines of a file
Output last 20 lines and follow live file growth
Count total number of lines in a file
#3. Text Searching & Pattern Filtering
High-performance text extraction, regex filtering, and stream processing.
Case-insensitive search for string pattern in file
Recursively search all files in current directory with line numbers
Invert match to display lines that do NOT contain pattern
Recursively locate files by wildcard filename pattern
Find all regular files larger than 10 Megabytes
Stream editor search and replace all instances of string
Extract and print specific space-delimited columns
#4. Permissions & Ownership Management
Controlling POSIX file security, read/write/execute bits, and user ownership.
Owner: Read/Write/Execute (7); Group & Others: Read/Execute (5)
Owner: Read/Write (6); Group & Others: Read-Only (4) - Standard file mode
Owner: Read/Write (6); Others: No access (0) - Required for SSH private keys
Add executable permission to current user
Change owner user and group of file or directory
Recursively update ownership across entire directory tree
#5. System Monitoring, Memory & Processes
Inspecting live CPU utilization, memory allocations, running processes, and terminating jobs.
Interactive real-time process manager and system metrics
Enhanced colorized process viewer with scrollable thread tree
Snapshot of all active processes running on the operating system
Find specific running process ID by name
Forcefully terminate process by its Process ID
Display total, used, and available RAM and Swap in human-readable GB/MB
Print Linux kernel version, architecture, and hostname
Show how long the system has been running and load averages
#6. Disk Space & Storage Inspection
Analyzing filesystem capacity, partition usage, and directory size footprints.
Show disk space usage of all mounted filesystems in human-readable format
Summarize total disk size of each folder in current working directory
Inspect directory sizes exactly 1 level deep
#7. Networking, Connectivity & Downloads
Transferring data over HTTP/HTTPS, testing latency, and checking open sockets.
Fetch only HTTP response headers without body
Download remote file and save under its original filename
Download file from web server in background
Send 4 ICMP ECHO_REQUEST packets to verify network reachability
List all listening TCP and UDP network ports without resolving names
#8. Archiving, Tarballs & Compression
Bundling multiple files into tarballs and compressing archives with gzip.
Create gzipped tarball archive of target directory
Extract gzipped tarball archive into current directory
List files inside tar archive without extracting
Compress file into .gz format and replace original
Decompress .gz file back to original uncompressed file
Linux File Permissions & Chmod Octal Calculator
Linux permissions are divided into three user classes: User (Owner), Group, and Others. Each class receives permissions calculated by summing the binary octal values: Read (4), Write (2), and Execute (1).
| Octal Mode | Symbolic Format | Owner (User) | Group | Others (World) | Common Use Case |
|---|---|---|---|---|---|
| 777 | rwxrwxrwx | Read/Write/Exec | Read/Write/Exec | Read/Write/Exec | Full Public Access (Security Hazard in Production) |
| 755 | rwxr-xr-x | Read/Write/Exec | Read/Exec | Read/Exec | Standard Executable Scripts & Public Web Directories |
| 644 | rw-r--r-- | Read/Write | Read-Only | Read-Only | Standard File Permission (HTML, CSS, text documents) |
| 600 | rw------- | Read/Write | None | None | Sensitive Files (SSH private keys, password files) |
| 700 | rwx------ | Read/Write/Exec | None | None | Private Directories (e.g. ~/.ssh/ folder) |
Essential Bash Shell Keyboard Shortcuts
Master terminal navigation and speed up your productivity using command-line hotkeys.
Send SIGINT to terminate the currently running foreground process.
Clear the terminal screen buffer (equivalent to running clear).
Reverse-i-search history buffer to search previously executed commands.
Jump cursor directly to beginning (A) or end (E) of the current command line.
Cut text from cursor to the start (U) or from cursor to the end (K) of line.
Autocomplete command, argument, or directory path name automatically.
Linux Filesystem Hierarchy Standard (FHS) Quick Map
Understanding what resides inside root system directories is crucial for systems administration and troubleshooting.
System-wide configuration files (e.g. /etc/hosts, /etc/passwd, /etc/ssh).
System and application log files (e.g. /var/log/syslog, /var/log/auth.log).
User personal home directories containing documents, project files, and personal configs.
Temporary files created by system and applications, cleared automatically on reboot.
Essential user command binaries (e.g. ls, grep, cat, curl).
Optional third-party standalone software packages and custom server installations.
Ready to Put These Commands to Practice?
Launch our zero-lag browser terminal sandbox and test any of the 100+ commands above with zero installation.