This tutorial guides you in installing vnStat on Ubuntu 22.04 to monitor network traffic on your system.
Installing vnStat on Ubuntu 22.04
The default Ubuntu repository includes the latest version of vnStat, which is 2.9; thus, it makes the installation pretty straightforward on Ubuntu.
The vnStat installation can easily be completed by executing a single command in the terminal, which is shown below:
After the vnStat installation is completed, you can then check its version with the help of the below-mentioned command:
The above command ensures that the latest version of vnStat is successfully installed on the system.
To enable vnStat, use the following command:
After enabling the vnStat, execute the following command to verify whether the service is running fine.
The above output ensures that the vnStat is active and is running perfectly fine. If the vnStat service stops, execute the following command to start it.
Monitor Network Traffic using vnStat
The vnStat offers several options to help you monitor network traffic in several ways. So whether you are looking for a network update at any time, you will get the desired information right onto your terminal through following command:
In case, if you want to monitor the network traffic for five minutes, use the following command.
For daily network traffic monitoring, use the following command:
If you need additional help, you can use the following command to get the list of different commands you can use with vnStat.
Removing vnStat from Ubuntu 22.04
If you no longer want to use vnStat services on your system, you can execute the following command to remove the application from your system.
Conclusion
The vnStat is a lightweight utility used to monitor network traffic on Linux operating systems. It provides you the system’s bandwidth consumption of any time right onto your command-line terminal. The above installation guide will help you install the latest version of vnStat through the official Ubuntu repository so that you will be able to monitor network traffic on your system.