The only Linux command you need for monitoring network traffic – and how to use it

The only Linux command you need for monitoring network traffic – and how to use it

The only Linux command you need for monitoring network traffic – and how to use it

https://www.zdnet.com/article/monitor-network-traffic-iftop-command-linux/

Publish Date: 2026-01-26 22:01:00

Source Domain: www.zdnet.com

Marcus Millo/iStock/Getty Images Plus via Getty Images

Follow ZDNET: Add us as a preferred source on Google.

ZDNET’s key takeaways

  • There are several ways to monitor network traffic on Linux.
  • You should regularly check on incoming and outgoing traffic.
  • One of the best tools for this is iftop.

Linux has a tool for everything. Sometimes those tools come in the form of an easy-to-use GUI, and other times a command is necessary. For monitoring network traffic, your best bet is the command line.

Once you dive down the rabbit hole of possible commands for this task, you could become overwhelmed with choices — and with the complexity of some of those commands. 

Also: The first 8 Linux commands every new user should learn

I wanted to find an easier way to check network traffic, and it didn’t take long to find what I was looking for.

The tool I used to use for this is Wireshark, but I’ve found it’s been a bit cumbersome over the years. Also, getting the Flatpak version of Wireshark working properly is a PITA. 

Why use something complex when something simple will do?

The best solution I found is the iftop command. According to the iftop man page, “iftop – display bandwidth usage on an interface by host.” The iftop command listens to network traffic on a specific network interface (or the first interface it finds) and displays an easy-to-read table for bandwidth usage. 

The table iftop presents displays incoming and outgoing traffic in a way that’s easy to discern. 

Also: The 6 Linux distros I expect to rule 2026 – as someone who’s tested hundreds of them

Iftop is also flexible, with several important options. However, you don’t have to get bogged down in options, as I’ve found that only one is necessary.

Let me show you how this is done.

Installing iftop

What you’ll need: Iftop can be installed from the standard repositories of most Linux distributions, so all you’ll need is your Linux distro of choice and a user with sudo access.

First, open your default terminal app from…

Source