Linux Bash Commands Cheat Sheet - Essential Reference (2026)
By Jay, editor · Every shortcut on this site is verified by hand against official documentation · Updated July 2026
Published: March 15, 2026 · Updated: April 1, 2026
The Linux command line is the most powerful tool in a system administrator's arsenal. Whether you are managing servers, processing data, or automating workflows, these Bash commands are your daily tools.
File Operations
ls -la lists all files with permissions, sizes, and dates. find . -name "*.log" -mtime +7 finds log files older than 7 days. chmod +x script.sh makes a file executable. Chain them: find . -name "*.tmp" -delete finds and deletes all .tmp files.
Text Processing Power
The Unix philosophy shines in text processing. grep -r "error" /var/log/ searches all log files for errors. Pipe to sort | uniq -c | sort -rn to count and rank occurrences. awk '{print $1}' extracts the first column. sed 's/old/new/g' replaces text globally.
System Monitoring
top or htop shows real-time CPU and memory usage. df -h checks disk space. free -h shows memory. netstat -tlnp lists open ports. ps aux | grep process finds specific processes.
Networking
curl -I https://example.com checks HTTP headers. ssh user@host connects remotely. scp file.txt user@host:/path/ copies files over SSH. rsync -avz src/ dest/ syncs directories efficiently.
Piping and Redirection
The pipe | connects commands: cat access.log | grep "404" | wc -l counts 404 errors. Use > to write to file, >> to append, and 2>&1 to redirect errors. tee writes to both screen and file simultaneously.
Search shortcuts for 268 platforms interactively
Open Shortcut FinderHow to read a command line
Each entry is a command followed by options (dashes) and arguments; options can usually be combined (ls -la) and most commands answer --help or have a manual page (man ls). The sheet lists the everyday forms; the man page lists everything. Bracketed placeholders are values to replace, and a trailing slash on a directory matters for cp and rsync in ways the sheet's notes point out.
Pipes are the whole point
The commands become powerful when joined: ps aux | grep nginx, du -sh * | sort -h, cat access.log | cut -d' ' -f1 | sort | uniq -c | sort -rn | head. Each tool does one thing to a stream of text, and the pipe hands the result on. Learning grep, sort, uniq, cut, head and tail as a set is worth more than any single command, and the text-processing pages on this site (awk, sed, jq) continue from there.
Safety
rm -rf, chmod -R, chown -R and anything with sudo deserve a pause, and rm -rf / with a mistyped variable is the classic disaster — quote variables and test with echo first. The bash page on this site adds the line-editing keys and the shell features (history, aliases, job control) that the command list leaves out.