Command reference organized by the questions you're trying to answer
Questions: What's my network config? What interfaces do I have? What's my default gateway?
# Show all interfaces with IPs
ip a
# Show specific interface
ip addr show eth0
# Show only IPv4
ip -4 a
# Show only IPv6
ip -6 a
2: eth0:
link/ether 00:0c:29:xx:xx:xx
inet 192.168.1.100/24 brd 192.168.1.255 scope global eth0
inet6 fe80::20c:29ff:fexx:xxxx/64 scope link
ip link set eth0 up# Show routing table
ip r
# Show routes for specific destination
ip route get 8.8.8.8
# Add route (requires sudo)
sudo ip route add 10.0.0.0/24 via 192.168.1.1
# Delete route
sudo ip route del 10.0.0.0/24
default via 192.168.1.1 dev eth0 proto dhcp metric 100
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.100
# Show neighbor cache (ARP table)
ip neigh
# Flush all entries
sudo ip neigh flush all
# Delete specific entry
sudo ip neigh del 192.168.1.1 dev eth0
192.168.1.1 dev eth0 lladdr aa:bb:cc:dd:ee:ff REACHABLE
192.168.1.50 dev eth0 lladdr 11:22:33:44:55:66 STALE