Linux Network Diagnostic Troubleshooting: 5 Essential CLI Tools for SysAdmins
When services fail to communicate, resolving packet drops, routing loops, and port conflicts quickly is critical. Here are the core command-line tools every network and systems engineer relies on daily.
1. Inspect Active Sockets and Listening Ports (ss)
The modern replacement for netstat to verify running network daemons:
bash - socket statistics
# List all listening TCP/UDP ports with associated process names
sudo ss -tulpn
2. Trace Route and Latency with MTR
Combines ping and traceroute into a real-time responsive linux network diagnostic tool:
bash - routing diagnostic
# Install and run a 10-packet trace to a destination IP/domain
sudo apt install -y mtr-tiny
mtr -rw -c 10 1.1.1.1
3. Test End-to-End Port Reachability with Netcat
Check if a remote firewall or security group is dropping traffic without generating excessive logs:
bash - port connectivity
# Verify connection to remote IP on port 443 with a 3-second timeout
nc -zv -w 3 192.168.1.1 443