How to Monitor Network Bandwidth Using the Command Line on Linux

How to Monitor Network Bandwidth Using Command Line On Linux

Analyzing and monitoring the network traffic of an entire network infrastructure is a very important task for every Linux system administrator. Network admin needs to see what’s going on with the network, who’s using the bandwidth, and how their entire network infrastructure is handling the load. The good thing is there are many open-source network monitoring and traffic analysis tools available in Linux.

In this post, we will discuss some Linux command line tools that can be used to monitor the network usage.


Nload is a console application that allows users to monitor the incoming and outgoing traffic separately.

It visualizes the incoming and outgoing traffic using two graphs and provides additional info like total amount of transferred data and min/max network usage.

You can install nload by running the following command:

Now run the nload command:

Once the nload command is executed, you should see the following output.



Iptraf is an ncurses-based IP LAN monitoring tool that shows individual connections and the amount of data flowing between the hosts.

To install iptraf, run the following:

Once iptraf has been installed, issue the following command:

You should see the following output.



Vnstat is different from most of the other tools. It is a console-based network traffic monitor for Linux that runs as a daemon and keeps a log of network traffic for the selected interface. It can be used to generate a report of the network usage.

You can install vnstat by running the following command:

Now, run vnstat without any argument:

You can see the total amount of data transfer on your network.


If you want to monitor the bandwidth usage in realtime, use the -l option. It will display the total bandwidth used by incoming and outgoing data.

Now, run vnstat to monitor the bandwidth usage on the wlan0 interface:

You will see the following output.



Speedometer is a command line utility that can be used to monitor the current download/upload speeds of the network connections and the speeds of the file systems. Speedometer shows a graph of your current and past network speed in your console. You can also use speedometer directly on a file to monitor the download performance and history of a specific download instead of all the network traffic.

Run the following command to install speedometer in your system:

Now, run speedometer on  wlan0 interface:

You will see an output similar to the following.



Iftop is a command line tool that listens to network traffic on a given interface (such as eth0, eth1, wlan0) and shows a table of current bandwidth usage by hosts. Iftop uses the pcap library to capture the incoming and outgoing packets of the network interface.

You can easily install iftop by running the following command:

Now, run iftop with the n option that prevents iftop from resolving ip addresses to hostname:

You will see the following output.



I hope this post will be helpful to quickly check the network bandwidth on your Linux server. Feel free to leave a comment if you have any questions.

Hitesh Jethva Hitesh Jethva

Over 5 years of experience as IT system administrator for IT company in India. My skills include a deep knowledge of Rehat/Centos, Ubuntu nginx and Apache, Mysql, Subversion, Linux, Ubuntu, web hosting, web server, squied proxy, NFS, FTP, DNS, Samba, ldap, Openvpn, Haproxy, Amazon web services, WHMCS, Openstack Cloud, Postfix Mail Server, Security etc.

One comment

Comments are closed.