-
-
Notifications
You must be signed in to change notification settings - Fork 1
Linux Network Utilities
Complete beginner-friendly guide to network utilities on Linux, covering Arch Linux, CachyOS, and other distributions including network testing, network analysis, and network troubleshooting tools.
Test connectivity:
# Ping host
ping google.com
# Ping with count
ping -c 4 google.com
# Ping with interval
ping -i 2 google.com
# Stop with Ctrl+CWhat it does:
- Sends ICMP packets to test connectivity
- Shows response time and packet loss
- Useful for basic connectivity testing
Trace route:
# Arch/CachyOS
sudo pacman -S traceroute
# Debian/Ubuntu
sudo apt install traceroute
# Fedora
sudo dnf install traceroute
# Trace route
traceroute google.com
# Or tracepath (built-in)
tracepath google.comWhat it does:
- Shows the path packets take to destination
- Lists each hop (router) along the way
- Useful for diagnosing network routing issues
Network statistics:
# Arch/CachyOS
sudo pacman -S net-tools
# Debian/Ubuntu
sudo apt install net-tools
# Fedora
sudo dnf install net-tools
# List connections
netstat -tuln
# List processes
netstat -tulnp
# Show all connections
netstat -aOptions:
-
-t: TCP connections -
-u: UDP connections -
-l: Listening ports -
-n: Numeric addresses -
-p: Show process IDs
Socket statistics (modern replacement for netstat):
# List connections
ss -tuln
# List processes
ss -tulnp
# Show established
ss -tn
# Show listening
ss -tlnWhat it does:
- Faster than netstat
- Shows socket information
- Better for modern systems
Network scanner:
# Arch/CachyOS
sudo pacman -S nmap
# Debian/Ubuntu
sudo apt install nmap
# Fedora
sudo dnf install nmap
# Scan host
nmap hostname
# Scan network
nmap 192.168.1.0/24
# Scan specific port
nmap -p 80 hostnameWhat it does:
- Scans for open ports
- Identifies services
- Useful for security auditing
Network analyzer:
# Arch/CachyOS
sudo pacman -S wireshark-cli wireshark-qt
# Debian/Ubuntu
sudo apt install wireshark
# Fedora
sudo dnf install wireshark
# Launch (requires root)
sudo wiresharkWhat it does:
- Captures and analyzes network packets
- GUI tool for deep network inspection
- Useful for debugging network issues
Packet capture (command-line):
# Arch/CachyOS
sudo pacman -S tcpdump
# Debian/Ubuntu
sudo apt install tcpdump
# Fedora
sudo dnf install tcpdump
# Capture packets
sudo tcpdump -i eth0
# Save to file
sudo tcpdump -i eth0 -w capture.pcap
# Filter by port
sudo tcpdump -i eth0 port 80What it does:
- Captures network packets
- Command-line alternative to Wireshark
- Useful for scripting and automation
Bandwidth testing:
# Arch/CachyOS
sudo pacman -S iperf3
# Debian/Ubuntu
sudo apt install iperf3
# Fedora
sudo dnf install iperf3
# Server
iperf3 -s
# Client
iperf3 -c server-ip
# Test upload
iperf3 -c server-ip -RWhat it does:
- Tests network bandwidth
- Measures throughput
- Useful for network performance testing
Diagnose:
# Check interface
ip link show
# Check routing
ip route show
# Check DNS
nslookup google.com
# Check connectivity
ping -c 4 google.comAnalyze:
# Check bandwidth
iperf3 -c server
# Check latency
ping -c 10 server
# Check packet loss
ping -c 100 server
# Trace route
traceroute serverCheck ports:
# Check if port is open
ss -tlnp | grep :80
# Scan for open ports
nmap localhost
# Test connection
nc -zv hostname 80This guide covered network utilities for Arch Linux, CachyOS, and other distributions, including testing, analysis, tools, and troubleshooting.
- Networking - Network configuration
- SS Network Troubleshooting - More on ss
- Ping & Traceroute - Network testing
- ArchWiki Network Tools: https://wiki.archlinux.org/title/Network_tools
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.