Network discovery

Linux Command Line Quick Reference

1 min read

Published Aug 18 2026


19
0
0
0

CLILinuxUbuntu

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

bash
ip addrip -br addrip linkip routeip neighhost example.comdig example.comdig +short example.comgetent hosts example.com

ip 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

bash
ping -c 4 1.1.1.1ping -c 4 example.comss -tulpnss -ltntracepath example.com

ping -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.

© 2025 SimpleSteps.guide
AboutFAQPoliciesContact
Linux Command Line Quick Reference | Network discovery | SimpleSteps.guide