Check Linux Network Configuration

To understand a Linux system’s network configuration, check its addresses, routes, DNS settings, and listening services. Older commands such as ifconfig and route still appear in historical documentation, but the ip command is preferred on modern systems.

IP addresses and interfaces

ip addr
ip link

Routes and default gateway

ip route

DNS configuration

cat /etc/resolv.conf
resolvectl status

On systems using systemd-resolved, /etc/resolv.conf may be generated automatically, so resolvectl status can provide more useful detail.

Listening ports

ss -tulpn

Together, these commands give a quick picture of how the host is connected and how traffic leaves the system.

Leave a Comment