How To Install vnstat on AlmaLinux 8

In this tutorial we learn how to install vnstat in AlmaLinux 8. vnstat is Console-based network traffic monitor

Introduction

In this tutorial we learn how to install vnstat on AlmaLinux 8.

What is vnstat

vnStat is a console-based network traffic monitor that keeps a log of daily network traffic for the selected interface(s). vnStat isn’t a packet sniffer. The traffic information is analyzed from the /proc file-system, so vnStat can be used without root permissions. See the web-page for few ‘screenshots’.

We can use yum or dnf to install vnstat on AlmaLinux 8. In this tutorial we discuss both methods but you only need to choose one of method to install vnstat.

Install vnstat on AlmaLinux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install vnstat using dnf by running the following command:

sudo dnf -y install vnstat

Install vnstat on AlmaLinux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install vnstat using yum by running the following command:

sudo yum -y install vnstat

How To Uninstall vnstat on AlmaLinux 8

To uninstall only the vnstat package we can use the following command:

sudo dnf remove vnstat

References

Summary

In this tutorial we learn how to install vnstat on AlmaLinux 8 using yum and dnf.