Batch 01 · Aarambh — AWS + Agentic AI starts 28 June 2026Batch 01 · Aarambh — AWS + Agentic AI starts 28 June 2026Batch 01 · Aarambh — AWS + Agentic AI starts 28 June 2026Batch 01 · Aarambh — AWS + Agentic AI starts 28 June 2026Batch 01 · Aarambh — AWS + Agentic AI starts 28 June 2026Batch 01 · Aarambh — AWS + Agentic AI starts 28 June 2026Batch 01 · Aarambh — AWS + Agentic AI starts 28 June 2026Batch 01 · Aarambh — AWS + Agentic AI starts 28 June 2026
All cheatsheets
Linux · Cheatsheet

Linux for DevOps — Cheatsheet

Top 100 commands every DevOps engineer uses daily. Plus systemd, networking, and log triage.

Updated 2026-05-21 10 min

File & directory navigation

pwdPrint current working directory
ls -lahList all (incl. hidden) with human-readable sizes
cd -Jump back to previous directory
tree -L 2Tree view, 2 levels deep (install: apt install tree)
find . -name '*.log' -mtime -1Files modified in last 24h
find . -size +100MFiles larger than 100 MB
du -sh * | sort -hSize of each item in PWD, sorted
df -hTDisk free, human-readable, with FS type

File contents & search

cat -n file.logPrint with line numbers
tail -f -n 200 app.logFollow last 200 lines (live)
less +F app.logLike tail -f, press Ctrl+C then q to quit
grep -rIn 'TODO' .Recursive search, ignore binaries, show line nums
grep -E 'ERROR|FATAL' app.logMulti-pattern grep
awk '{print $1, $NF}' access.logPrint first + last field
sed -i 's/old/new/g' file.txtIn-place find/replace
jq '.items[] | .name' data.jsonExtract field from JSON

Process & resource monitoring

ps -ef | grep nginxFind nginx processes
top / htop / btopLive CPU + memory (btop is gorgeous)
pidof nginxGet PID of a process
kill -9 <pid>Force kill
lsof -i :8080Who is listening on port 8080
free -hMemory in human-readable form
vmstat 2 55 samples, 2-sec interval — CPU + memory + IO
iostat -xz 2Disk IO stats (install: sysstat package)

Networking

ip a / ip routeShow interfaces / routing table
ss -tlnpListening TCP ports + process (replaces netstat)
curl -v https://example.comVerbose HTTP request
curl -w '%{http_code} %{time_total}s\n' -o /dev/null -s URLHTTP code + time only
dig +short example.comDNS lookup, just the answer
traceroute -T -p 443 example.comTrace route over TCP 443
mtr example.comLive continuous traceroute
tcpdump -i eth0 port 443Sniff traffic on a port

Systemd

systemctl status nginxService status + last log lines
systemctl restart nginxRestart unit
systemctl enable --now nginxStart now + at boot
systemctl daemon-reloadReload after editing a unit file
journalctl -u nginx -fFollow logs for one unit
journalctl --since '10 min ago'Logs in last 10 minutes
journalctl -p err -bErrors since last boot
systemctl list-units --failedList failed services

Users, permissions, security

whoami / idWho am I + my groups
sudo -u ec2-user -iBecome another user (login shell)
chmod 640 filerw- r-- --- (owner rw, group r, other none)
chown -R app:app /opt/appRecursively change owner + group
getfacl pathShow extended ACLs
ssh -i key.pem ec2-user@hostSSH with PEM key
ssh-keygen -t ed25519 -C 'me@example.com'Generate modern SSH key
sha256sum file.tar.gzVerify file integrity

Compression & transfer

tar -czf out.tar.gz dir/Create gzipped tarball
tar -xzf in.tar.gzExtract gzipped tarball
rsync -avz --progress src/ user@host:/dst/Sync directory over SSH
scp file user@host:/path/Copy single file over SSH
wget -c https://...Resumable download
curl -O https://...Download keeping remote filename

Want the full hands-on training behind this?

Cloudadhar batches walk you through every command in a real production setup — with labs, code reviews, and 1:1 doubt sessions.