Linux Commands

Command Line Network Speed Monitoring Apps for Linux

Many command line tools for monitoring network speed and bandwidth consumption are available for Linux. These tools are useful if you want to have a quick glance at real time traffic statistics or if you want to debug a networking issue. In fact, a lot of graphical apps, applets and extensions make use of these apps to display data by piping their output and running string manipulation and regex commands.

This article will list some of the most popular command line network speed monitoring tools available for Linux. Before going ahead, take heed of a few things. Some commands require root permissions to access network information. If you are not comfortable with these apps, many other no-root options are mentioned below.

Secondly, the command below will be regularly used to auto detect currently active network interface on your system. Whenever you see this command used in other commands, you can replace it with proper name of a network interface if you know it.

$ ip link show | awk '/state UP/ {print $2}' | sed 's/.$//'

Let’s get started.

Ifstat

Ifstat is a simple command line utility that displays network bandwidth consumption and speed at regular intervals.

To install ifstat in Ubuntu, run the command below:

$ sudo apt install ifstat

To view network speed for all interfaces, run the command below:

$ ifstat -tTS

To view network speed for active interface only, run the command below:

$ ifstat -tTSz

Slurm

Slurm is command line tool to monitor real time network traffic. Apart from statistics about incoming and outgoing traffic, it also displays colorful ascii graphics to represent network consumption.

To install slurm in Ubuntu, run the command below:

$ sudo apt install slurm

To view network speed of currently active interface, run the command below:

$ slurm -i $(ip link show | awk '/state UP/ {print $2}' | sed 's/.$//')

Bmon

Bmon is a command line tool to capture and monitor network traffic activity. By default, it shows network speed in an interactive curses based user interface inside a terminal. However, it supports other output formats like HTML and plain text as well.

To install Bmon in Ubuntu, run the command below:

$ sudo apt install bmon

To view network speed for all interfaces, run the command below:

$ bmon

To view network speed for active interface only, run the command below:

$ bmon -p $(ip link show | awk '/state UP/ {print $2}' | sed 's/.$//')

Speedometer

Speedometer, as the name suggests, is a tool for monitoring and measuring network bandwidth. It’s terminal based interface uses colorful labels and graphs to represent bandwidth consumption and network speed.

To install speedometer in Ubuntu, run the command below:

$ sudo apt install speedometer

To view network speed of currently active interface, run the command below:

$ speedometer -r $(ip link show | awk '/state UP/ {print $2}' | sed 's/.$//')
-t $(ip link show | awk '/state UP/ {print $2}' | sed 's/.$//')

Nethogs

Nethogs is a command line “top” tool for monitoring network speed. It works similar to top / htop utility and displays network speed for every process that is responsible for in or out network traffic.

To install nethogs in Ubuntu, run the command below:

$ sudo apt install nethogs

To view network speed for all interfaces, run the command below:

$ sudo nethogs

To view network speed of currently active interface, run the command below:

$ sudo nethogs device $(ip link show | awk '/state UP/ {print $2}' | sed 's/.$//')

Iftop

Iftop is another network monitoring tool that works like “top” command line tool. It displays network traffic for different processes in a tabular form.

To install Iftop in Ubuntu, run the command below:

$ sudo apt install iftop

To view network speed of currently active interface, run the command below:

$ sudo iftop -i $(ip link show | awk '/state UP/ {print $2}' | sed 's/.$//')

Vnstat

Vnstat is simple and straightforward tool for monitoring network speed. Though it does not have bells and whistles of other tools mentioned above, it just works and can show network speed in just one line.

To install Vnstat in Ubuntu, run the command below:

$ sudo apt install vnstat

To view network speed of currently active interface, run the command below:

$ vnstat -l -i $(ip link show | awk '/state UP/ {print $2}' | sed 's/.$//')

Nload

Nload is a console based utility that can display real time network traffic statistics as well as maximum, minimum, and average bandwidth consumption.

To install Nload in Ubuntu, run the command below:

$ sudo apt install nload

To view network speed of currently active interface, run the command below:

$ nload devices $(ip link show | awk '/state UP/ {print $2}' | sed 's/.$//')

Wavemon

Wavemon is a command line tool that allows you to monitor wireless signal quality, speed, bandwidth consumption, and other useful information about your wireless connection.

To install Wavemon in Ubuntu, run the command below:

$ sudo apt install wavemon

To view network speed of currently active wireless interface, run the command below:

$ wavemon

Conclusion

Some apps have been omitted from this list as they aren’t being maintained anymore. However, almost all of the tools mentioned above come pre-installed by default on most Linux distributions and require no setup. They are useful for desktop PCs and are also extensively used for remotely monitoring servers.

About the author

Nitesh Kumar

I am a freelancer software developer and content writer who loves Linux, open source software and the free software community.