Introduction and How to use Iftop on Ubuntu 20.04

2024/10/29
6m
0
0 comment
Print

This tutorial provides a step-by-step guide on using Iftop on Ubuntu 20.04. Iftop is a software tool that allows you to analyze data transfer on your server network. By utilizing Iftop’s unique capabilities, you can easily stay informed about server activities that may occur without your knowledge. Our primary objective in this article is to familiarize you with Iftop and teach you how to effectively use it on Ubuntu 20.04. If you are considering purchasing a VPS server, we recommend exploring the Linux VPS packages offered by NeuronVM.

Introduction to Iftop

Iftop is a tool for viewing incoming and outgoing traffic between network nodes. You can use this tool on the Linux operating system. It runs on the command line and is similar to the tool mentioned above. The difference is that the top command displays the number of resources used, such as RAM and CPU, but the Iftop command displays the selected network monitor and consumed traffic. The next section will help you to Install Iftop on Ubuntu 20.04.

How to Install Iftop on Ubuntu 20.04

In this section, we will explore the installation process of Iftop on Ubuntu 20.04. The following commands can be executed in sequence to achieve this. To begin, it is important to update the package repository by using the following command:
sudo apt-get update -y
You can Install Iftop by executing the command below:
sudo apt-get install -y iftop
Now that we installed Iftop, it’s time to see how we can use Iftop on Ubuntu 20.04!

Tutorial: Use Iftop on Ubuntu Linux

Let’s see how we can use Iftop on Ubuntu 20.04. Using this tool is very easy. Just follow the steps below. Open the terminal and type iftop. You should have the root privileges to see the bandwidth of the first network interface. Then press Q to exit the iftop command output.
iftop
how to use iftop on Ubuntu
You can view the source and destination listening ports by pressing SHIFT+S and SHIFT+D. In the image below, you can see that the traffic is displayed. You can also see the source and destination ports:
using iftop on ubuntu 20.04
You can see a specific interface by running the following network bandwidth command:
iftop -i eth0
how to view the network bandwidth using iftop on ubuntu
Tip: By default, Iftop presents traffic information in kilo/mega/gigabits per second. However, if you prefer to view traffic data in bytes instead of bits, you can utilize the following command:
iftop -i eth0 -B
In the command above, B must be typed in capital letters.
how to display all traffic in bytes instead of bits using iftop
To observe the traffic on the port, utilize the following command. Please take note that the parameter N in the command below indicates the port number.
iftop -i eth0 -P -N
how to see the traffic on the port using iftop on ubuntu
To monitor the incoming and outgoing packets of a network, execute the following command:
iftop -F YourDesiredIPAddress
If you need more information on Iftop and how it works, you can use the following command:
man iftop

Conclusion

As previously stated, Iftop is a tool utilized for monitoring the current bandwidth on a network interface. By listening to network traffic on a specific interface, it presents a table that showcases the current bandwidth between host pairs. It is important to note that Iftop should be executed by either a root user or a user with adequate privileges to effectively monitor network bandwidth. If you had any other questions, please feel free to contact us in the comment section.
Share this Post

Leave a reply

Calculate the value of (5 - 2) :

Save my name and email in this browser for the next time.

Last Comments

Show More
Rating: 0/5