ipdetecto.com logo
ipdetecto.com
My IPSpeed
Knowledge Hub
HomeKnowledge HubLinux Networking Commands
© 2026 ipdetecto.com
support@ipdetecto.comAboutContactPrivacyTermsllms.txt
Troubleshooting
5 MIN READ
Apr 19, 2026

Linux Networking Commands

Inspect routes, addresses, sockets, and DNS from the CLI: ip, ss, ping, traceroute, dig, and nmcli.

Modern Linux favors ip from iproute2 over legacy ifconfig. ip addr shows addresses, ip route the FIB, and ip neigh the ARP/NDP cache. ss lists sockets—pair with -lptn for listening TCP ports and processes. ping and traceroute test reachability; dig or resolvectl debug DNS. nmcli controls NetworkManager profiles on desktops and servers alike.

CommandPurposeExample
ip -br aBrief addressesQuick host overview
ss -tanpTCP sockets + processesFind who listens on 443
ip route getPath selectionSee which iface hits 8.8.8.8

Related

ss and netstat, netstat vs ss, ping vs traceroute vs MTR, DNS troubleshooting, Linux routing tables

Frequently Asked Questions

Q.Why prefer ip over ifconfig?

ip exposes policy routing, IPv6, and bridge details consistently; ifconfig is often a stub on minimal systems.

Q.How do I see the default gateway?

Use ip route show default or ip -4 route show default for IPv4-specific gateways.

Q.What replaces netstat for sockets?

ss is faster and ships by default; netstat may be omitted unless net-tools is installed.

Q.How can I test DNS resolution?

Use dig +trace for delegation issues or resolvectl status on systemd-resolved hosts.

Q.Why does ping work but curl fails?

ICMP may succeed while TCP port 443 is filtered—compare with curl or ss path tests.

Q.What does ip neigh show?

Neighbor cache entries mapping IPs to MAC addresses—stale entries hint at L2 issues.

Q.How do I reload networking without rebooting?

Use nmcli connection reload or distro-specific networking services—avoid killing ssh sessions blindly.

Q.Where does NetworkManager store profiles?

Typically under /etc/NetworkManager/system-connections—edit with nmcli or files carefully.
TOPICS & TAGS
ip commandsslinux networkingip routedig