Home United States USA — software The only Linux command you need for monitoring network traffic – and...

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

192
0
SHARE

Recently, I needed to check on incoming and outgoing traffic to one of my Linux machines. Fortunately, there’s an easy way to do just that.
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.
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.

Continue reading...