iftop
iftop shows ongoing bandwidth usage on the network interfaceInstallation
When iftop is not installed by default, it can be added to the system using the relevant software package.
Package information for iftop
Operating system | Package name | Installation |
---|---|---|
AlmaLinux | iftop |
|
Arch Linux | iftop |
|
Debian | iftop |
|
Fedora | iftop |
|
Red Hat Enterprise Linux | iftop |
|
Rocky Linux | iftop |
|
Ubuntu | iftop |
|
Your Linux distribution using a different package? Share your feedback.
Usage
Available options
Option | Description |
---|---|
-h | Show usage summary |
-n | No lookup for hostnames |
-N | No lookup for service names |
-p | Promiscuous mode to include traffic not going via the interface |
-P | Show port numbers |
-l | Include traffic on link-local IPv6 |
-m | Set upper limit for scale (with K/M/G suffix) |
-B | Bandwidth in bytes/sec instead of bits/sec |
-i IFACE | Define interface IFACE |
-f FILTER | Define a filter with FILTER |
-F NETMASK | Define the network mask filter using NETMASK (e.g. /24) |
-G NETMASK6 | Define the IPv6 network mask filter using NETMASK6 |
-c FILE | Define configuration file using FILE |
-t | No ncursus output, instead print to STDOUT |
Missing an option in this overview? Share your feedback.
Shortcuts and keys
Key or key combination | Action |
---|---|
1 | Sort by first column |
2 | Sort by second column |
3 | Sort by third column |
< | Sort by source |
> | Sort by destination |
b | Toggle bar display |
d | Aggregate traffic by destination |
f | Define filter code |
h (or ?) | Show help |
j | Move down, useful with 'o' |
k | Move up, useful with 'o' |
l | Define POSIX extended regular expression to filter hostnames |
n | Enable or disable hostnames |
o | Freeze current screen order |
p | Show or hide ports |
s | Aggregate traffic by source |
t | Cycle through the display modes |
B | Cycle through bar graph period (2/10/40 seconds) |
D | Show or hide destination port |
L | Toggle between lineair or logarithimic scale |
N | Enable or disable service names for ports |
P | Pause or unpause output |
S | Show or hide source port |
T | Show totals |
Examples using iftop
Bandwidth usage
Show active connections and bandwidth usage
iftop
Filter connections
Only show connections originating from our system to a destination on port 80 (http)
iftop -f 'dst port 80'
Relevant articles using the iftop command
The following articles include an example on how to use iftop and might be worth further exploring.