Linux’s networking toolset is deep, but a handful of tools cover the vast majority of real troubleshooting sessions — worth having them memorized rather than searching for syntax each time.
# Basic connectivity ping -c 4 8.8.8.8 # DNS resolution dig example.com nslookup example.com # Path tracing traceroute example.com mtr example.com # combines ping + traceroute, continuously updating # What's listening on which port sudo ss -tulpn sudo netstat -tulpn # older, ss is the modern replacement # Test whether a specific port is reachable nc -zv example.com 443 # Capture and inspect actual traffic sudo tcpdump -i eth0 port 443
ss has replaced netstat on modern distros — faster, and pulls directly from the kernel rather than parsing /proc the way netstat does — worth using it by default, though netstat‘s syntax is still worth recognizing when you encounter it in older documentation.