Last Updated : 15 Jul, 2025
The 'iftop' command is a powerful network analysis tool used by system administrators to monitor real-time bandwidth usage on network interfaces. It provides a quick and detailed overview of networking activities, helping diagnose network issues by identifying which applications or processes are consuming the most bandwidth. It stands for 'Interface TOP' and the top is derived from the top command in Linux. It even acts as a diagnostic to 'diagnose' which program is causing the problem to the network.
Installing 'iftop' commandInstalling 'iftop' on Linux varies slightly depending on the distribution you are using. Below are the installation steps for RedHat-based systems and Debian or Ubuntu systems:
1. For RedHat-based Linux (version 8 or below)yum install epel-release
yum install iftop2. For RedHat-based Linux (version 9)
sudo dnf install epel-release sudo dnf install iftop3. For Debian or Ubuntu Linux
sudo apt install iftopKey Options available in `iftop` command in Linux
Options
Description
iftop
Displays basic real-time bandwidth usage of the default network interface.
-i wlo1
Shows real-time bandwidth details of a specific network interface named "wlo1".
-n -i wlo1
Disables hostname lookup and provides bandwidth statistics for the specified interface "wlo1".
-N -i wlo1
Disables the conversion of port numbers to services and presents bandwidth stats for the specified interface "wlo1".
-b
Turns off the display of the bar graph representation for network traffic.
-t
Presents the output in a text interface format without using ncurses.
-o source
Sorts the output based on the source IP address of network flows.
-o destination
Sorts the output based on the destination IP address of network flows.
-L 2 -i wlo1
Specifies that only 2 lines of statistics or bandwidth usage should be printed for the interface "wlo1".
-h
Displays the help section providing usage information and options for the iftop command.
Working with iftop Command 1. To display basic bandwidth usage of the default interface.iftopDisplay Basic bandwidth usage
This command will now display all the bandwidth related stats of the default interface.
2. To display bandwidth details of a specific routersudo iftop -i wlo1display bandwidth deatil
This command will now display all the bandwidth related stats of the specified network interface which is wlo1.
3. To stop hostname lookupsudo iftop -n -i wloTo stop hostname lookup
This command will now stop the lookup of the hostname for the specified network interface which is 'wlo1'.
4. To stop the conversion of port numbers to services.sudo iftop -N -i wlo1stop the conversion
This command will not convert the port number to services while printing stats for the specified network interface which is 'wlo1'.
5 To stop the display of bar graph.sudo iftop -bDisplay a bar graph
This command will remove the bar graph of traffic from the output.
6. To display the text interface without ncursessudo iftop -tDisplay without ncurses
This command will display the output in the text interface without 'ncurses'.
7. To sort output by source addresssudo iftop -o sourceTo sort by source
This command will sort the output on the basis of the source address.
8. To sort output by destination addresssudo iftop -o destinationTo sort by destination
This command will sort the output on the basis of the destination address.
9. To specify number of lines to be printedsudo iftop -L 2 -i wlo1To display specific number
This command will print 2 output lines of statistics or bandwidth usage and not more than 2 lines will be printed.
10. To display helpsudo iftop -hhelp
This command will display the help section of the iftop command.
ConclusionIn this article we discussed 'iftop' command which is a valuable network analysis tool for administrators, providing real-time bandwidth usage stats and aiding in network troubleshooting. With customizable options, it offers efficient monitoring and sorting capabilities. By installing 'iftop' on Linux distributions, administrators can gain insights into network traffic and optimize network performance effectively.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4