Nethogs is a tool for monitoring network bandwidth via command line. Different than most of the other tools, Nethogs groups bandwidth usage by process instead of per protocol or per subnet.
This tutorial explains how to install Nethogs on Ubuntu 20.04.
Make sure the package lists are up-to-date:
sudo apt update
sudo apt install -y nethogs
When installation is finished, we can check Nethogs version:
nethogs command without any arguments, if you want view network bandwidth usage on all interfaces that's running:
Run the following command to get a list of all available network interfaces:
ip addr show
Next, provide interface name as argument to view the bandwidth usage on a specific interface:
sudo nethogs ens33
Press q to exit Nethogs.
If you want to completely remove Nethogs, run the following command:
sudo apt purge --autoremove -y nethogs