Searchable, printable, mobile friendly

Cheat Sheet Library

Quick technical references for the commands and facts you look up constantly. Use your browser's print function (Ctrl/Cmd+P) to print any sheet.

Windows Command Prompt

16 entries

The commands you reach for constantly at a Windows help desk.

ipconfig /allFull network configuration for every adapter
ipconfig /release + /renewDrop and request a new DHCP lease
ipconfig /flushdnsClear the local DNS resolver cache
ping <host>Test basic reachability and latency
tracert <host>Show the path packets take, hop by hop
nslookup <host>Resolve a hostname to an IP via DNS
netstat -anList active connections and listening ports
arp -aShow the local ARP (IP-to-MAC) cache
route printShow the local routing table
systeminfoFull system and OS summary
gpupdate /forceForce an immediate Group Policy refresh
gpresult /rShow which GPOs actually applied
sfc /scannowScan and repair protected system files
whoamiShow the current user context
tasklistList running processes
taskkill /PID <id> /FForce-terminate a process by ID

Linux Command Line

15 entries

Core commands for administering and troubleshooting Linux systems.

ip addrShow network interfaces and IP addresses
ip routeShow the routing table
ping <host>Test reachability and latency
traceroute <host>Show the path to a destination, hop by hop
dig <host>Detailed DNS lookup
ss -tulpnList listening sockets and owning processes
journalctl -xeShow recent, detailed system log entries
systemctl status <svc>Check whether a service is running
systemctl restart <svc>Restart a service
grep -R "text" .Recursively search files for text
tcpdump -i eth0Capture live network traffic on an interface
df -hShow disk space usage, human-readable
top / htopLive view of process resource usage
chmod / chownChange file permissions / ownership
tail -f /var/log/syslogFollow a log file live as it updates

PowerShell

12 entries

Structured, object-based commands for Windows administration.

Get-NetIPConfigurationFull network config as structured objects
Test-NetConnection <host> -Port 443Test reachability to a specific port
Resolve-DnsName <host>DNS lookup, structured output
Clear-DnsClientCacheFlush the local DNS cache
Get-ProcessList running processes with resource usage
Get-ServiceList Windows services and their status
Restart-Service <name>Restart a Windows service
Get-ADUser -Identity <user>Look up an Active Directory user (RSAT)
Unlock-ADAccount -Identity <user>Unlock a locked AD account
Get-WinEvent -LogName System -MaxEvents 20Read recent system event log entries
Get-ExecutionPolicyCheck the current script execution policy
Invoke-WebRequest <url>Make an HTTP request from the command line

Git

13 entries

The everyday Git workflow, from clone to push.

git clone <url>Copy a remote repository locally
git statusShow changed, staged, and untracked files
git add .Stage all changes for commit
git commit -m "message"Save staged changes with a message
git pushSend local commits to the remote
git pullFetch and merge remote changes
git branch <name>Create a new branch
git checkout -b <name>Create and switch to a new branch
git merge <branch>Merge a branch into the current one
git log --onelineCompact commit history
git diffShow unstaged changes
git stashTemporarily shelve uncommitted changes
git reset --hard HEADDiscard all local changes (careful!)

Subnetting & CIDR

12 entries

The subnet-mask-to-host-count table you always end up needing.

/24 — 255.255.255.0256 addresses, 254 usable hosts
/25 — 255.255.255.128128 addresses, 126 usable hosts
/26 — 255.255.255.19264 addresses, 62 usable hosts
/27 — 255.255.255.22432 addresses, 30 usable hosts
/28 — 255.255.255.24016 addresses, 14 usable hosts
/29 — 255.255.255.2488 addresses, 6 usable hosts
/30 — 255.255.255.2524 addresses, 2 usable hosts (point-to-point links)
10.0.0.0/8Private range, ~16.7 million addresses
172.16.0.0/12Private range, ~1 million addresses
192.168.0.0/16Private range, ~65,000 addresses
169.254.0.0/16Link-local / APIPA — no DHCP lease obtained
127.0.0.0/8Loopback range

Common Ports

15 entries

The ports that come up constantly in networking and security work.

20 / 21 — FTPFile transfer, data / control channel
22 — SSHSecure remote shell and tunneling
25 — SMTPMail transfer between servers
53 — DNSDomain name resolution
67 / 68 — DHCPDynamic IP address assignment
80 — HTTPUnencrypted web traffic
110 — POP3Mail retrieval (older)
123 — NTPTime synchronization
143 — IMAPMail retrieval, multi-device sync
389 — LDAPDirectory services (e.g. Active Directory)
443 — HTTPSEncrypted web traffic (TLS)
445 — SMBWindows file and printer sharing
3306 — MySQLMySQL/MariaDB database
3389 — RDPWindows Remote Desktop
5432 — PostgreSQLPostgreSQL database