-
-
Notifications
You must be signed in to change notification settings - Fork 1
Linux netstat Guide
Mattscreative edited this page Dec 5, 2025
·
2 revisions
Complete beginner-friendly guide to netstat on Linux, covering Arch Linux, CachyOS, and other distributions including network connections, listening ports, and network statistics.
Arch/CachyOS:
# Install net-tools (includes netstat)
sudo pacman -S net-tools
# Note: ss is modern replacementDebian/Ubuntu:
sudo apt install net-toolsFedora:
sudo dnf install net-toolsCheck netstat:
# Check version
netstat --version
# Check help
netstat --helpView connections:
# List all connections
netstat -a
# List TCP connections
netstat -at
# List UDP connections
netstat -auView listeners:
# List listening ports
netstat -l
# TCP listeners
netstat -lt
# UDP listeners
netstat -luActive connections:
# Established connections
netstat -tn
# With process info
netstat -tnp
# Show hostnames
netstat -tnFilter by state:
# Listening
netstat -ln
# Established
netstat -tn | grep ESTABLISHED
# All states
netstat -aNetwork stats:
# Interface statistics
netstat -i
# Extended stats
netstat -ie
# Statistics by protocol
netstat -sView routes:
# Routing table
netstat -r
# With hostnames
netstat -rnInstall net-tools:
# Install net-tools
sudo pacman -S net-tools
# Or use ss (modern replacement)
ss -tulnThis guide covered netstat installation, network connection viewing, and statistics for Arch Linux, CachyOS, and other distributions.
- SS Network Troubleshooting - Modern ss tool
- Network Utilities - Network tools
- Networking - Network setup
-
netstat Documentation:
man netstat
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.