Understanding network connections helps troubleshoot connectivity and security issues.
Show Active Connections
ss -tulnFlags: -t TCP, -u UDP, -l listening, -n numeric.
Show All Connections with Process Info
ss -tulnpShow Established Connections
ss -tn state establishedNetwork Interfaces
ip addr show
ip link showRouting Table
ip route showTest Connectivity
# Ping
ping -c 4 google.com
# DNS lookup
dig google.com
nslookup google.com
# Traceroute
traceroute google.com