Linux Mint

How to Install and Use vnStat on Linux Mint 21

There are a whole bunch of applications available online for free that can be used to monitor the network traffic specifically for Linux systems. vnStat is one of the best options if anyone is looking for monitoring the network traffic on their Linux system. This guide is all about the process of installing vnStat on Linux Mint 21 and if you are interested in installing this application then give this guide a go.

Installing vnStat in Linux Mint 21

The process of installing vnStat is quite straightforward as it can be installed using the default package manager but still there are some steps one needs to follow:

Step 1: Update the package list of apt package manager to avoid any possible errors using:

$ sudo apt update

Step 2: Next, install the vnStat using the default package manager of Linux Mint:

$ sudo apt install vnstat

Step 3: Next, check the version of this application to check if it is installed correctly or not:

$ vnstat --version

Step 4: After that enable this application using:

$ sudo systemctl enable vnstat

Step 5: Now see if the application is running or not by checking its status using:

$ sudo systemctl status vnstat

If the application is dead or not active, then start it using:

$ sudo systemctl start vnstat

Step 6: Now to monitor the network use vnstat command with time in minutes, further the syntax for it is given below:

$ vnstat -<time-in-minutes>

For example, if we want to monitor the network for five minutes then:

$ vnstat -5

Next, if you need help with using commands in monitoring the network then use:

$ vnstat --longhelp

If you want to remove this application it then use:

$ sudo apt remove --autoremove vnstat -y

Conclusion

Network monitoring is one of the main constituents when it comes to the security of the system and there are a number of tools available for that purpose. vnStat is the best choice for monitoring the network’s Linux systems as it is lightweight, easy to use and freely available. It can be installed on Linux Mint 21 using its default package manager though there are some other necessary steps for its installation that are mentioned in this guide.

About the author

Aaliyan Javaid

I am an electrical engineer and a technical blogger. My keen interest in embedded systems has led me to write and share my knowledge about them.