Run the Nethogs command on the Ubuntu terminal to view the network bandwidth.
Nethogs is a network traffic monitoring tool on a terminal. It displays the bandwidth usage of each process, so that the network usage can be obtained more intuitively. It supports IPv4 and IPv6 protocols, local NICs, and PPP connections.
Top: You can view the cpu and memory used by processes, and monitor the processes that occupy the maximum cpu and memory at any time.
Nethogs can be said to be the top network bandwidth. It can view the bandwidth used by the process. It is the same as top and can be refreshed at any time.
Install: This program is available in Ubuntu official sources.
Sudo apt-get install nethogs
Usage:
Sudo nethogs eth0
This program requires the root permission. By default, the eth0 Nic is monitored. Therefore, you can directly enter sudo nethogs. If there are multiple NICs, you must specify them.