Tutorial how to use Iftop on Ubuntu 20.04, Ubuntu 18.04 step by step. Iftop is software that examines the details of data transfer on your server network. With the help of the unique power of Iftop, you can very easily be informed of what happens on the server without your knowledge. First, we will introduce you to Iftop. Then in this article, our goal is to teach you How to use Iftop on Ubuntu 20.04. If you are planning to buy VPS server, we suggest you check out the Linux VPS packages available at NeuronVM.
Introduction to Iftop
Iftop is a tool for viewing incoming and outgoing traffic between network nodes and its implementation platform is the Linux operating system. This program runs on the command line and is similar to the top program. The difference is that the top command displays the number of resources used, such as RAM and CPU, and the Iftop command displays the selected network monitor and consumed traffic.
In the next section, we will teach you how to Install Iftop on Ubuntu 20.04.
How to Install Iftop on Ubuntu 20.04 | Ubuntu 18.04
In this section, we want to examine how to install Iftop on Ubuntu 20.04. This is easily done by executing the following commands in order. You must first update the package repository with the following command:
sudo apt-get update -y
Then you can easily install Iftop by running the following command:
sudo apt-get install -y iftop
In the next section, we will teach you how to use Iftop on Ubuntu 20.04. Please join us.
Tutorial Use Iftop on Ubuntu Linux
In this section, we are going to review how to use Iftop on ubuntu 20.04. How to use this tool is very easy. Just follow the steps below.
You can type the iftop command on the terminal with root privileges to display the bandwidth of the first network interface. Then press the Q key to exit the iftop command output.
You can view the source and destination listening ports by pressing SHIFT+S and SHIFT+D. As you can see in the image below, this traffic is displayed along with the source and destination ports:
You can see a specific interface by running the following network bandwidth command:
iftop -i eth0
Note: By default, Iftop displays all traffic in kilo/mega/gigabits per second, you can use the following command to display all traffic in bytes instead of bits:
iftop -i eth0 -B
In the above command, B must be typed in capital letters.
If you want to see the traffic on the port, you should use the following command. It should be noted that in the following command, parameter N shows the port number.
iftop -i eth0 -P -N
If you need to view the input and output packets flowing of a network, you can type and execute the following command:
iftop -F YourDesiredIPAddress
Finally, you can use the following command to get more information about Iftop:
As mentioned, Iftop is using to view the current bandwidth in the network interface. It listens to network traffic at a specified interface. It then displays a table of current bandwidth by the host pair. Note that Iftop must be run by a root user or a user with sufficient privileges to monitor network bandwidth. In this article, we tried to examine How to use Iftop on Ubuntu 20.04.