Applies to: RHEL-family Linux — RHEL 6–10 / Rocky Linux 8–10 / AlmaLinux 8–10 / CentOS 6–8 / CentOS Stream 8–10
Linux includes a small set of command-line tools that can quickly answer the most common network troubleshooting questions: Is the interface up? Is there a route? Is the remote host reachable? Is the port listening? Is DNS resolving correctly?
The original version of this article used tools such as netstat, arp, and telnet. Those commands are still useful in older environments, but current RHEL-family systems primarily use ip, ss, ip neigh, nmcli, and tools such as nc or curl.
In This Article
- 1. IP Address and Interface Status
- 2. Routing
- 3. Reachability
- 4. Listening Ports and Connections
- 5. Test a Remote Port
- 6. DNS Lookups
- 7. Neighbor Cache
- 8. Hostname
- 9. Legacy Command Mapping
- 10. Key Takeaways
1. IP Address and Interface Status
Display interfaces and assigned IP addresses:
ip addr
ip link
On NetworkManager-based systems, this is also useful:
nmcli device status
nmcli device show
2. Routing
Display the routing table:
ip route
Check which route Linux would use for a specific destination:
ip route get 192.0.2.10
3. Reachability
Use ping for a basic ICMP reachability test:
ping -c 4 192.0.2.10
ping -c 4 example.com
A failed ping does not always mean the remote host is down. ICMP can be blocked by a firewall while the application service itself remains reachable.
To see the path toward a destination:
traceroute example.com
4. Listening Ports and Connections
Use ss instead of netstat on current systems:
ss -tuln
ss -tulnp
The second command also shows the process using each socket when you have sufficient permissions.
5. Test a Remote Port
Instead of using Telnet simply to test whether a TCP port is reachable, use nc:
nc -vz server.example.com 443
For HTTP and HTTPS services, curl provides a more useful application-level test:
curl -I https://server.example.com
6. DNS Lookups
Use dig for detailed DNS troubleshooting:
dig example.com
dig example.com MX
dig @192.0.2.53 example.com
nslookup is still available on many systems and is useful for quick interactive queries:
nslookup example.com
7. Neighbor Cache
Use ip neigh to view IPv4 ARP and IPv6 neighbor entries:
ip neigh
8. Hostname
Display the current hostname:
hostname
hostnamectl
On current RHEL-family systems, use hostnamectl or nmcli to change the persistent hostname instead of relying on the older hostname newname command:
hostnamectl set-hostname server01.example.com
9. Legacy Command Mapping
| Legacy command | Current equivalent |
|---|---|
| ifconfig | ip addr / ip link |
| route | ip route |
| arp | ip neigh |
| netstat -ntl | ss -ntl |
| netstat -ntlp | ss -ntlp |
| netstat -nulp | ss -nulp |
| telnet host port | nc -vz host port |
The older commands come mainly from the net-tools package. On current RHEL releases, net-tools is not installed by default, so learning the iproute2-based commands is the better long-term approach.
10. Key Takeaways
- Use ip for interfaces, addresses, routes, and neighbor information.
- Use ss for listening ports and active sockets.
- Use nc or curl instead of Telnet for most connectivity tests.
- Use dig for detailed DNS troubleshooting.
- Keep legacy net-tools commands in mind when working with older Linux systems, but prefer the modern equivalents on current releases.
References
- Red Hat – Common Networking Command Equivalents
- Red Hat – Configuring and Managing Networking in RHEL 10

Cloud and infrastructure professional with nearly two decades of experience in enterprise IT environments, spanning public cloud, private cloud, and hybrid architectures.