Skip to content

Linux Network Utilities

Mattscreative edited this page Dec 5, 2025 · 2 revisions

Linux Network Utilities Guide

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.


Table of Contents

  1. Network Testing
  2. Network Analysis
  3. Network Tools
  4. Troubleshooting

Network Testing

ping

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+C

What it does:

  • Sends ICMP packets to test connectivity
  • Shows response time and packet loss
  • Useful for basic connectivity testing

traceroute

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.com

What it does:

  • Shows the path packets take to destination
  • Lists each hop (router) along the way
  • Useful for diagnosing network routing issues

Network Analysis

netstat

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 -a

Options:

  • -t: TCP connections
  • -u: UDP connections
  • -l: Listening ports
  • -n: Numeric addresses
  • -p: Show process IDs

ss

Socket statistics (modern replacement for netstat):

# List connections
ss -tuln

# List processes
ss -tulnp

# Show established
ss -tn

# Show listening
ss -tln

What it does:

  • Faster than netstat
  • Shows socket information
  • Better for modern systems

nmap

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 hostname

What it does:

  • Scans for open ports
  • Identifies services
  • Useful for security auditing

Network Tools

wireshark

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 wireshark

What it does:

  • Captures and analyzes network packets
  • GUI tool for deep network inspection
  • Useful for debugging network issues

tcpdump

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 80

What it does:

  • Captures network packets
  • Command-line alternative to Wireshark
  • Useful for scripting and automation

iperf3

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 -R

What it does:

  • Tests network bandwidth
  • Measures throughput
  • Useful for network performance testing

Troubleshooting

Connection Issues

Diagnose:

# Check interface
ip link show

# Check routing
ip route show

# Check DNS
nslookup google.com

# Check connectivity
ping -c 4 google.com

Slow Network

Analyze:

# Check bandwidth
iperf3 -c server

# Check latency
ping -c 10 server

# Check packet loss
ping -c 100 server

# Trace route
traceroute server

Port Issues

Check ports:

# Check if port is open
ss -tlnp | grep :80

# Scan for open ports
nmap localhost

# Test connection
nc -zv hostname 80

Summary

This guide covered network utilities for Arch Linux, CachyOS, and other distributions, including testing, analysis, tools, and troubleshooting.


Next Steps


This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.

Clone this wiki locally