You can install vnStat on Fedora Linux using the following steps:
- Install vnStat package: To install vnStat, use the following command:
sudo dnf install vnstat
- Create a database: Once the installation is complete, create a database for vnStat to store the network traffic data by running the following command:
sudo vnstat -u -i <interface>
Replace <interface> with the network interface you want to monitor, for example eth0
or wlan0
.
- Start the service: Start the vnStat service using the following command:
sudo systemctl start vnstat
- Enable the service: To make sure vnStat starts at boot, use the following command:
sudo systemctl enable vnstat
- Check status: To check the status of the vnStat service use the following command:
sudo systemctl status vnstat
- Check traffic: To check network traffic, use the following command:
vnstat
- Use web interface: vnStat also provides a web interface that can be accessed via http://<hostname>/vnstat/. You can install vnStat PHP frontend to access it via web.
- Configure vnStat: You can configure vnStat by editing the configuration file located at
/etc/vnstat.conf
.
You should now be able to monitor your network traffic using vnStat on Fedora Linux.