Essential Linux Command‑Line Tools for Network Monitoring
This guide introduces a curated list of Linux command‑line utilities—including nethogs, nload, slurm, iftop, collectl, netstat, and many others—explaining their purpose, installation commands for various distributions, and basic usage examples to help system administrators monitor network traffic and bandwidth effectively.
nethogs
Displays per‑process bandwidth usage for IPv4 and IPv6. Run on a specific interface (e.g., eth0) to see upload and download rates per PID. nethogs eth0 Use -p to enable promiscuous mode if required.
nethogs -p wlan0nload
Console visualizer that shows real‑time inbound and outbound traffic graphs for a selected interface. Switch interfaces with the left/right arrow keys.
nloadslurm
ASCII‑based bandwidth monitor with interactive keys (c, s, r, L, m, q). Install from the distribution repository.
sudo apt-get install slurm sudo yum -y install slurmiftop
Shows bandwidth usage per socket pair. Install and run on a chosen interface.
sudo apt-get install iftop sudo yum -y install iftop sudo iftop -i wlan0collectl
Collects system performance data, including network statistics. It supports a recording mode (writes data to files or sockets) and a replay mode (reads recorded files).
sudo apt-get install collectl sudo yum -y install collectlnetstat (net‑tools)
Displays TCP/UDP connections, routing tables, interface statistics, and protocol counters.
sudo apt-get install net-tools sudo yum -y install net-tools netstat -tulnpnetload (netdiag)
Provides a brief report of total bytes transferred since the program started. Part of the netdiag package.
sudo apt-get install netdiag sudo yum -y install netdiag netload wlan0Nagios
Open‑source monitoring system with a web interface (e.g., http://localhost/nagios/) for tracking servers, switches, routers, and printers. Installation follows the standard Nagios documentation.
EtherApe
Graphical network monitor that visualizes traffic by host and protocol. Supports Ethernet, FDDI, token‑ring, ISDN, PPP, SLIP, and WLAN interfaces.
sudo apt-get install etherape sudo yum -y install etherape sudo etherapetcpflow
Captures TCP streams and saves each flow to a separate file for later analysis. Installable from distribution repositories or via the Repoforge RPM.
sudo apt-get install tcpflow sudo yum -y install tcpflow # yum install --nogpgcheck http://pkgs.repoforge.org/tcpflow/tcpflow-0.21-1.2.el6.rf.x86_64.rpm sudo tcpflow -i eth0 port 8000IPTraf
Console‑based network statistics tool that shows packet/byte counts, interface info, and TCP/UDP traffic.
sudo apt-get install iptraf sudo yum -y install iptraf sudo iptraf wlan0Speedometer
Simple visualizer that draws a graph of upload and download rates for a given interface.
sudo apt-get install speedometer sudo yum -y install speedometer speedometer -r wlan0 -t wlan0Netwatch (netdiag)
Shows current connections and transfer rates for local and remote hosts. Part of the netdiag suite.
sudo apt-get install netdiag sudo yum -y install netwatch sudo netwatch -e wlan0 -ntTrafshow
Reports active connections, protocols, and transfer rates with pcap‑style filtering.
sudo apt-get install trafshow sudo yum -y install trafshow sudo trafshow -i wlan0 sudo trafshow -i wlan0 tcpvnstat
Daemon‑based traffic logger that records total transferred data and can produce historical usage reports. Use -l for live monitoring.
sudo apt-get install vnstat sudo yum -y install vnstat vnstat vnstat -ltcptrack
Displays live TCP connection status similar to top. Can filter by port.
sudo apt-get install tcptrack # yum -y install tcptrack sudo tcptrack -i wlan0 tcptrack -i wlan0 port 80CBM (Color Bandwidth Meter)
Shows bandwidth usage for all network devices. Source code is available at http://www.isotton.com/utils/cbm/.
sudo apt-get install cbm cbmbmon
Bandwidth monitor with curses, HTML, and ASCII output modes.
sudo apt-get install bmon sudo yum -y install bmon bmontcpdump
Powerful packet capture tool for debugging and analysis. Capture on a specific interface or filter by port.
sudo apt-get install tcpdump sudo yum -y install tcpdump sudo tcpdump -i wlan0 sudo tcpdump -i wlan0 'port 80'ntopng
Next‑generation version of ntop; provides a web‑based interface for traffic analysis. Requires compilation from source on Debian/Ubuntu.
sudo apt-get install libpcap-dev libglib2.0-dev libgeoip-dev redis-server wget libxml2-dev build-essential checkinstall wget http://sourceforge.net/projects/ntop/files/ntopng/ntopng-1.1_6932.tgz/download -O ntopng.tgz tar xzf ntopng.tgz && cd ntopng-1.1_6932 ./configure && make && sudo make installAfter installation, access the web UI (default http://localhost:3000/).
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.
Liangxu Linux
Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)
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.
