IT Pro Toolkit · Reference

Linux Command Cheat Sheet

The 60 commands a sysadmin actually reaches for — grouped by what you're trying to do, with a one-line explanation for each. Bookmark it, or keep the printable version on your second monitor.

Updated July 2026 · ~6 min read

Every sysadmin builds the same muscle memory eventually — but when you're new, mid-incident, or just switching between distros, a fast reference beats digging through man pages. This is that reference: the commands that come up on a real machine, day in and day out, organized by the task in front of you rather than alphabetically. Nothing exotic, nothing padded.

Navigating and finding things

CommandWhat it does
pwdPrint the current working directory
ls -lahList all files, human-readable sizes, long format
cd -Jump back to the previous directory
find . -name "*.log"Find files by name under the current tree
grep -rn "TODO" .Recursively search file contents, with line numbers
locate nginx.confFind a file fast via the prebuilt index
tree -L 2Show the directory structure two levels deep

Working with files

CommandWhat it does
cp -r src/ dst/Copy a directory and its contents
mv old newMove or rename a file or directory
rm -rf dir/Delete a directory and everything in it (careful)
tail -f app.logStream new lines of a file as they're written
head -n 50 fileShow the first 50 lines
less filePage through a file (q to quit, / to search)
wc -l fileCount lines in a file
diff a bShow line-by-line differences between two files

Permissions and ownership

CommandWhat it does
chmod 644 fileOwner read/write, everyone else read-only
chmod +x script.shMake a file executable
chown user:group fileChange a file's owner and group
umaskShow the default permission mask for new files
sudo !!Re-run the last command with sudo
Permissions read as owner / group / others. chmod 750 means owner full (7), group read+execute (5), others nothing (0). Once that clicks, the numbers stop being mysterious.

Processes and system state

CommandWhat it does
top / htopLive view of CPU, memory, and processes
ps aux | grep nodeFind a running process by name
kill -9 PIDForce-terminate a process by its ID
df -hDisk space used and free, human-readable
du -sh *Size of each item in the current directory
free -hMemory usage at a glance
uptimeHow long the box has been up, plus load average
systemctl status nginxCheck whether a service is running
journalctl -u nginx -fFollow a service's logs live

Networking

CommandWhat it does
ip aShow network interfaces and IP addresses
ping -c 4 hostSend four pings to test reachability
ss -tulpnList listening ports and the processes behind them
curl -I https://siteFetch just the HTTP response headers
dig example.comQuery DNS records for a domain
scp file user@host:/pathCopy a file to a remote machine over SSH

Packages and updates

CommandWhat it does
apt update && apt upgradeRefresh and install updates (Debian/Ubuntu)
apt install pkgInstall a package
dnf install pkgInstall a package (Fedora/RHEL)
which python3Show the full path of a command
man commandOpen the manual for any command

Want this as a clean, printable one-pager?

The full Ultimate Linux Command Cheat Sheet is a single, print-ready page built for a second monitor — every command above plus flags, pipes, and redirects, laid out so you never break flow hunting for syntax. Instant download, one-time $3.

Get the printable cheat sheet — $3 →

How to actually remember these

Don't memorize the list — use it. Pick the five commands you reach for most this week and pin them somewhere visible. The rest stick through repetition. Grouping by task (the way this page is laid out) beats alphabetical order because your brain searches by intent: "I need to see what's using this port," not "I need a command starting with s."

The other trick is flags. ls is fine; ls -lah is the version you'll actually want every time. The printable sheet leans into that — it shows the useful flag combinations, not just the bare commands, which is the difference between a reference you glance at and one you outgrow in a week.