Network discovery
Linux Command Line Quick Reference
1 min read
Published Aug 18 2026
Guide Sections
Guide Comments
Use ip for current Linux interface, address and routing information. It replaces older tools such as ifconfig and route for most tasks.
Discover network configuration
ip addrip -br addrip linkip routeip neighhost example.comdig example.comdig +short example.comgetent hosts example.comip addr shows addresses assigned to interfaces. -br gives a compact view. ip link shows interface state. ip route displays the routing table, including the default gateway. ip neigh shows the neighbour table used for local network address resolution.
dig and host query DNS. getent hosts resolves a hostname through the system's configured name-service mechanisms.
Test reachability and inspect listening sockets with:
Test network paths and ports
ping -c 4 1.1.1.1ping -c 4 example.comss -tulpnss -ltntracepath example.comping -c 4 sends four ICMP echo requests. ss -tulpn shows TCP and UDP sockets, listening processes and numeric addresses where permissions allow. tracepath shows the route towards a remote host and can help identify where connectivity fails.