iftop how to use?

iftop display Network Interface Bandwidth Usage. To install iftop if not installed, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo apt-get install iftop

By default iftop command displays the bandwidth usage of the first available Ethernet device.

sudo iftop

Or you can also specify an interface using the -i option.

sudo iftop -i eth0

While iftop is running, you can press any one of the following keys to display more output.

S - display source port
D - display destination port
n - show IP instead of host name
1/2/3 - sort by the specified column
< - sort by source name
> - sort by destination name
P - pause display ( else it will be often updated to show the current status )
j/k - scroll display
? - for help

The image below shows the different arguments (options) that you can use with iftop.

enter image description here


Iftop is probably set up to use a different network interface. Run the command ifconfig to see your connections. Then if, for example, your connection is named eth0 run the command sudo iftop -i eth0. Hope this solved your problem.