« Back to Networking: Frequently Asked Questions

How to see active connections and bandwidth usage on Linux

The iftop command is one of the tools that is great for shows active connections and bandwidth usage on a Linux system. As the name implies, it is like ’top’ but for network connections.

Show active connections


By default most options are enabled. This may be useful, but also confusing if you are looking for specific traffic. A few good shortcuts include n (hostnames), N (service names).                    <=              604B   2,36Kb   483b    121b                  <=                31,1KB   444b    134b     67b                    <=              142B    568b    114b     28b                  <=            96,5KB     0b     83b   19,2Kb                  <=            96,8KB     0b     83b     95b               <=             9,56KB     0b     51b     38b                  <=             573B      0b     42b    115b                  <=             573B      0b     42b    115b               <=             4,78KB     0b     26b     19b                  <=              22,7KB     0b      0b   4,00Kb                  <=              12,4KB     0b      0b   2,49Kb                  <=                 6,42KB     0b      0b   1,28Kb

TX: cum:   1,70MB   peak:    205Kb                                  rates:    244b    344b   16,3Kb
RX:        5,98MB            450Kb                                           3,35Kb  1,03Kb  29,5Kb
TOTAL:     7,68MB            495Kb                                           3,59Kb  1,37Kb  45,9Kb

Bandwidth usage

To better see which connection is causing a lot of traffic, enable the bars using the b key. Depending on how traffic is distributed, it may be useful to switch between a linear or logarithmic scale with the L key.

Learn more about iftop

This article uses the iftop command to achieve its tasks. Want to learn how to use it or additional options that may be available?

» Mastering the tool

Installation and usage of iftop

Other questions related to Networking


Is the described answer not working or incorrect, got another tip or question? Share your thoughts!