All Articles

Linux Bash Commands Cheat Sheet - Essential Reference (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 230 platforms interactively

Open Shortcut Finder