Introduction
Linux provides powerful networking tools for configuration, troubleshooting, and monitoring. These commands are essential for any network engineer or system administrator working with Linux servers.
Network Configuration
# Show IP addresses
ip addr show
# Show routing table
ip route show
# DNS lookup
nslookup google.com
dig google.com
Connectivity Testing
# Ping a host
ping -c 4 google.com
# Trace route
traceroute google.com
# Test port connectivity
nc -zv localhost 80 8080
Network Statistics
# Show active connections
ss -tuln
# Show listening ports
ss -lntp
# Network statistics
netstat -s
File Transfer
# Download files
wget https://example.com/file.zip
curl -O https://example.com/file.zip
# Secure copy
scp file.txt user@host:/path/
# Sync directories
rsync -avz /local/ user@host:/remote/
Firewall Configuration
# UFW (Ubuntu)
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw enable
sudo ufw status
Summary
These networking commands help you configure interfaces, test connectivity, transfer files, and manage firewalls. Mastering them is critical for Linux server administration.
YouTip