Top 18 Linux Command‑Line Tools to Monitor Network Bandwidth
This guide reviews a collection of Linux command‑line utilities that monitor overall and per‑process network bandwidth, explain how they gather traffic data, and provide installation commands for each tool across major distributions.
This article introduces several Linux command‑line tools for monitoring network usage, showing inbound and outbound traffic, per‑process bandwidth, and various reporting mechanisms.
1. nload
nload displays inbound and outbound traffic separately and can draw adjustable charts; it has few options and is ideal for a quick overview of total bandwidth. $ nload Installation:
# fedora or centos $ yum install nload -y # ubuntu/debian $ sudo apt-get install nload2. iftop
iftop measures data transferred per socket connection using the pcap library, allowing filtering and reporting of selected host connections, though it cannot show process IDs. $ sudo iftop -n Installation:
# fedora or centos $ yum install iftop -y # ubuntu/debian $ sudo apt-get install iftop3. iptraf
iptraf is an interactive, colorful IP LAN monitoring tool that shows data volume for each connection and host. $ sudo iptraf Installation:
# centos $ yum install iptraf # fedora or centos (epel) $ yum install iptraf-ng -y # ubuntu/debian $ sudo apt-get install iptraf iptraf-ng4. nethogs
nethogs is a small "net top" tool that lists processes by bandwidth usage, showing PID, user, and command path. $ sudo nethogs Installation:
# ubuntu/debian $ sudo apt-get install nethogs # fedora/centos (epel) $ sudo yum install nethogs -y5. bmon
bmon (bandwidth monitor) shows traffic load for all network interfaces with charts and packet‑level details. $ sudo apt-get install bmon Installation on CentOS requires Repoforge.
6. slurm
slurm is a simple network load monitor that displays device statistics with three ASCII graph modes, activated by the c, s, and l keys. $ slurm -s -i eth0 Installation:
# debian/ubuntu $ sudo apt-get install slurm # fedora/centos $ sudo yum install slurm -y7. tcptrack
tcptrack, like iftop, uses pcap to capture packets and compute per‑connection bandwidth, supporting standard pcap filters. $ sudo apt-get install tcptrack Installation on CentOS requires RepoForge.
8. vnstat
vnstat runs a daemon that continuously records transferred data and can generate historical usage reports. Use -l for real‑time monitoring.
$ vnstat $ vnstat -l -i eth0Installation:
# ubuntu/debian $ sudo apt-get install vnstat # fedora/centos (epel) $ sudo yum install vnstat9. bwm-ng
bwm-ng (bandwidth monitor next‑gen) provides a simple real‑time console view of interface speeds, with optional curses2 bar graphs.
$ bwm-ng $ bwm-ng -o curses2Installation:
# ubuntu/debian $ sudo apt-get install bwm-ng # fedora/centos (epel) $ sudo yum install bwm-ng10. cbm (Color Bandwidth Meter)
cbm is a tiny tool that continuously displays traffic size per interface without extra options.
$ sudo apt-get install cbm11. speedometer
speedometer draws attractive graphs of inbound and outbound traffic for a chosen interface. $ speedometer -r eth0 -t eth0 Installation:
# ubuntu/debian $ sudo apt-get install speedometer12. pktstat
pktstat shows all active connections, their traffic speed, connection type (TCP/UDP), and HTTP request details if applicable. $ sudo pktstat -i eth0 -nt Installation:
# sudo apt-get install pktstat13. netwatch
netwatch (part of netdiag) displays local and remote connections with per‑connection traffic speed. $ sudo netwatch -e eth0 -nt Installation:
# sudo apt-get install netdiag14. trafshow
trafshow reports active connections, protocols, and data transfer rates, supporting pcap‑style filters (e.g., TCP only). $ sudo trafshow -i eth0 tcp Installation:
# sudo apt-get install netdiag15. netload
netload provides a short report of current traffic load and total bytes transferred since start. $ netload eth0 Installation:
# sudo apt-get install netdiag16. ifstat
ifstat displays network bandwidth in batch mode, suitable for logging and analysis. $ ifstat -t -i eth0 0.5 Installation:
# ubuntu/debian $ sudo apt-get install ifstat # fedora/centos (repoforge) $ sudo yum install ifstat17. dstat
dstat is a versatile Python‑based tool that reports various system statistics, including network bandwidth, in batch mode or CSV output. $ dstat -nt Installation:
# sudo apt-get install dstat18. collectl
collectl reports system statistics in a dstat‑like format, covering CPU, memory, and network usage. $ collectl -sn -oT -i0.5 Installation:
# ubuntu/debian $ sudo apt-get install collectl # fedora $ sudo yum install collectlThese command‑line tools allow quick inspection of network bandwidth on Linux servers via SSH. Web‑based monitoring solutions such as ntop, darkstat, or enterprise tools like Nagios can also be used for broader infrastructure monitoring.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
