netstat is a classic command-line utility that displays network connections, routing tables, interface statistics, and protocol statistics. While ss has largely replaced it for socket information, netstat remains widely used and provides a comprehensive view of network status on Linux systems.
📑 Table of Contents
Key Features
- Connection Listing – View all active network connections
- Routing Tables – Display kernel routing information
- Interface Stats – Show network interface statistics
- Protocol Statistics – Display protocol-specific data
Installation
sudo apt install net-tools # Debian/Ubuntu
sudo dnf install net-tools # Fedora/RHEL
Basic Usage
# All connections
netstat -a
# Listening ports with process info
netstat -tlnp
# Routing table
netstat -r
# Interface statistics
netstat -i
# Show numeric addresses
netstat -n
# Continuous output
netstat -c
Was this article helpful?