The SRE's Leverage Toolkit: 50 Commands That Compound Your Impact
The command line is not a tool; it's a high-leverage interface to reality. A novice memorizes commands. An expert internalizes mental models. This is not a cheat sheet. This is a collection of mental models for thinking clearly under pressure, disguised as commands.
The Triage Toolkit
The first 60 seconds of an incident. These aren't just commands; they are questions to rapidly assess the blast radius.
ps aux | grep {process}Is the patient even breathing?lsof -i :{port}Who is listening at this address?df -hIs the room to breathe being suffocated?netstat -tulpnMapping the active conversations.kubectl get pods | grep -i errorFinding the sickest patient in the ward.
The Archaeologist's Brushes
Logs are the fossil record of your system's past. These tools excavate the story of a failure from the layers of history.
tail -f /var/log/*Watching history as it's written.journalctl -fu {service}Focusing on a single actor's story.grep -r "error" .Filtering the signal from the noise.zcat log.gz | grep "500"Unearthing stories from the archives.less +FA time machine for your logs.
The Shipping Inspector's Tools
Containers are standardized black boxes. These are the tools for inspecting the contents without breaking the seal.
docker ps -aA manifest of all cargo, past and present.docker stats --no-streamA quick weigh-in of the cargo's resource cost.crictl logs {container}Reading the captain's raw logbook.docker exec -it {container} bashThe universal key to open any container.podman top {container}Peeking at the crew working inside.
The System's EKG
A running system is a living organism. These commands are for reading its vital signs in real-time.
htopA real-time story of your system's attention.iostat -xz 1The heartbeat of your storage.free -hAssessing the system's short-term memory.vmstat 1The full vitals panel: memory, swap, IO.dmesg -T | tailListening to the kernel's inner monologue.
The Digital Cartographer
The network is an invisible landscape. These tools map the paths and conversations that define your system's geography.
curl -v {url}Debugging a conversation, word by word.dig +short {domain}Looking up an address in the global directory.ss -tunlpA census of all open doors and waiting listeners.iptables -L -n -vReading the laws of the land for packets.traceroute {host}Mapping the journey, hop by hop.
The Librarian's Essentials
Code and configuration are the books of your system. These are the tools for finding, copying, and organizing them.
find . -name "*.yaml"The perfect index for a massive library.rsync -avzA smarter, faster way to duplicate knowledge.tar -xvf {archive}Unpacking a shipment of knowledge.ln -s {target} {link}Creating a cross-reference.chmod +x {script}Giving a scroll the power to act.
The Quantum Physicist's Probes
Intrusive tools for when you must observe the system at a level where the act of observation can alter the state.
strace -p {pid}Spying on a process's conversations with the kernel.tcpdump -i any 'port 80'Eavesdropping on every network packet.sar -n DEV 1High-frequency network statistics.uptimeThe long-term burden on the system.top -cThe classic view of who's working hardest.
The Historian's Toolkit
Git isn't just source control; it's a tool for manipulating and understanding the history of ideas.
git log --oneline --graphThe simplified timeline of decisions.git reset --hard HEAD^The emergency "undo" for a bad decision.git stashPutting a thought aside to focus on another.git diff --stagedReviewing your work before you commit to it.git blame {file}The tool for understanding context, not assigning blame.
The Leverage Multipliers
These are meta-skills. They don't solve problems directly; they reduce the friction of solving problems, compounding your effectiveness.
sudo !!The privilege of hindsight.ctrl+rSearching your own memory.history | grep {term}Systematic memory recall.alias ll='ls -alh'Automating your own habits.watch -n1 {command}Turning any command into a live dashboard.
