Ubuntu - Networking - Cheatsheet

CommandDescription
ifconfigDisplay the link and address status of active interfaces.
ip addr showDisplay the link and address status of active interfaces.
route -nDisplay all the routing table in numerical addresses.
ip route showDisplay all the routing table in numerical addresses.
arpDisplay the current content of the ARP cache tables.
ip neighDisplay the current content of the ARP cache tables.
plogDisplay ppp daemon log.
ping google.comCheck the Internet connection to “google.com”.
whois google.comCheck who registered “google.com” in the domains database.
traceroute google.comTrace the Internet connection to “google.com”.
tracepath google.comTrace the Internet connection to “google.com”.
mtr google.comTrace the Internet connection to “google.com” (repeatedly).
dig [@dns-server.com] example.com [{a|mx|any}]Check DNS records of “example.com” by “dns-server.com” for a “a”, “mx”, or “any” record.
iptables -L -nCheck packet filter
netstat -aFind all open ports
netstat -l –inetFind listening ports.
netstat -ln –tcpFind listening TCP ports (numeric).
dlint example.comCheck DNS zone information of “example.com”.