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 slurmsudo yum -y install slurmiftop
Shows bandwidth usage per socket pair. Install and run on a chosen interface.
sudo apt-get install iftopsudo yum -y install iftopsudo 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 collectlsudo yum -y install collectlnetstat (net‑tools)
Displays TCP/UDP connections, routing tables, interface statistics, and protocol counters.
sudo apt-get install net-toolssudo yum -y install net-toolsnetstat -tulnpnetload (netdiag)
Provides a brief report of total bytes transferred since the program started. Part of the netdiag package.
sudo apt-get install netdiagsudo yum -y install netdiagnetload 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 etherapesudo yum -y install etherapesudo 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 tcpflowsudo yum -y install tcpflow# yum install --nogpgcheck http://pkgs.repoforge.org/tcpflow/tcpflow-0.21-1.2.el6.rf.x86_64.rpmsudo 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 iptrafsudo yum -y install iptrafsudo iptraf wlan0Speedometer
Simple visualizer that draws a graph of upload and download rates for a given interface.
sudo apt-get install speedometersudo yum -y install speedometerspeedometer -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 netdiagsudo yum -y install netwatchsudo netwatch -e wlan0 -ntTrafshow
Reports active connections, protocols, and transfer rates with pcap‑style filtering.
sudo apt-get install trafshowsudo yum -y install trafshowsudo trafshow -i wlan0sudo 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 vnstatsudo yum -y install vnstatvnstatvnstat -ltcptrack
Displays live TCP connection status similar to top. Can filter by port.
sudo apt-get install tcptrack# yum -y install tcptracksudo tcptrack -i wlan0tcptrack -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 cbmcbmbmon
Bandwidth monitor with curses, HTML, and ASCII output modes.
sudo apt-get install bmonsudo yum -y install bmonbmontcpdump
Powerful packet capture tool for debugging and analysis. Capture on a specific interface or filter by port.
sudo apt-get install tcpdumpsudo yum -y install tcpdumpsudo tcpdump -i wlan0sudo 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 checkinstallwget http://sourceforge.net/projects/ntop/files/ntopng/ntopng-1.1_6932.tgz/download -O ntopng.tgztar 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.
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.
