interview-prep
Command What
ip addr (replaces ifconfig) Network interfaces and IPs
ip route Routing table
ss -tlnp (replaces netstat -tlnp) TCP listening ports with process
ss -tnp state established Established TCP connections
ping <host> ICMP reachability
traceroute <host> / mtr <host> Path to destination
dig <name> DNS lookup
dig +trace <name> Show full DNS resolution path
nslookup <name> DNS lookup (older)
host <name> Simple DNS lookup
curl -v <url> HTTP request with verbose output
curl -I <url> Headers only
curl -w "%{http_code}\n" -o /dev/null -s <url> Just the status code
tcpdump -i any port 443 Packet capture
tcpdump -i any host 1.2.3.4 -w capture.pcap Capture to file for Wireshark

My notes