Cheat Sheet
The commands you keep forgetting, with a one-line description and a real example you can copy - 629 across 38 tools. Pick a tool in the sidebar, or search across all of them.
Showing Network Diagnostics. Choose another tool in the sidebar, or search all 629 commands.
Network Diagnostics
Diagnose connectivity, DNS, ports, and routes from the terminal.
| Command | What it does | Example |
|---|---|---|
ping | Is the host reachable? | ping -c 4 google.com |
dig | DNS lookup. | dig example.com |
dig +short | DNS lookup, answer only. | dig +short example.com |
dig MX | Look up mail records. | dig MX example.com |
nslookup | DNS lookup (the classic). | nslookup example.com |
traceroute | Show the network path to a host. | traceroute google.com |
curl -I | Check an HTTP endpoint’s headers. | curl -I https://example.com |
ss -tulpn | Listening ports and the PIDs behind them. | ss -tulpn |
lsof -i :PORT | What process is using a port. | lsof -i :3000 |
nc -zv | Test whether a remote port is open. | nc -zv example.com 443 |
ip a | Show your network interfaces / IPs. | ip a |
ip route | Show the routing table. | ip route |
whois | Domain registration details. | whois example.com |