Skip to content

Monitoring network transfer using the terminal on Ubuntu

Here are several effective ways to monitor network transfer on Ubuntu 24.04 using the terminal:

Real-time Network Monitoring

iftop – Shows bandwidth usage by connection

sudo apt install iftop
sudo iftop

nload – Simple, real-time network usage display

sudo apt install nload
nload

vnstat – Network statistics with historical data

sudo apt install vnstat
vnstat -l    # Live monitoring
vnstat -d    # Daily stats
vnstat -m    # Monthly stats

nethogs – Shows network usage per process

sudo apt install nethogs
sudo nethogs

Built-in Tools

ss (modern replacement for netstat)

ss -tuln          # Show listening ports
ss -i             # Show interface statistics
watch -n 1 'ss -i'  # Continuous monitoring

ip command for interface statistics

ip -s link        # Show interface stats
watch -n 1 'ip -s link'  # Continuous monitoring

cat /proc/net/dev – Raw network interface statistics

watch -n 1 'cat /proc/net/dev'

Advanced Monitoring

tcpdump – Packet capture and analysis

sudo tcpdump -i any  # Monitor all interfaces
sudo tcpdump -i eth0 # Monitor specific interface

bmon – Bandwidth monitor with nice interface

sudo apt install bmon
bmon

System-wide Monitoring

htop with network info

sudo apt install htop
htop  # Press F2 > Display options > Show network I/O

glances – Comprehensive system monitor

sudo apt install glances
glances

Quick One-liners

Monitor specific interface continuously:

watch -n 1 'cat /sys/class/net/eth0/statistics/rx_bytes /sys/class/net/eth0/statistics/tx_bytes'

For most users, iftop and nload provide the best balance of simplicity and usefulness for monitoring network transfer rates in real-time.

Published inUncategorized

Be First to Comment

Leave a Reply