mrtg command not found

In this troubleshooting guide we learn how to fix mrtg command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

mrtg: command not found

or when using sudo you get the following error message

sudo: mrtg: command not found

Solutions to mrtg: command not found

How To Fix mrtg: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu mrtg is provided by mrtg package.

mrtg is:

The Multi Router Traffic Grapher is a tool primarily used to monitor the traffic load on network links (typically by using SNMP). MRTG generates HTML pages containing PNG images which provide a LIVE visual representation of this traffic. MRTG typically produces daily, weekly, monthly, and yearly graphs.

In addition to monitoring via SNMP, MRTG can also generate graphs based on the output of any application, allowing one to generate graphs of anything that needs monitoring (for example, CPU and memory usage, email volumes, web hits, etc). For faster data collection, MRTG can also interface to RRDtool.

The mrtg-contrib package contains the contributed scripts and configuration files that used to form part of the mrtg package.

To fix this problem, we can install more using the command below.

sudo apt-get -y install mrtg

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install mrtg.

sudo apt -y install mrtg

Or if you have aptitude installed you can use the following command.

sudo aptitude install mrtg

Summary

In this tutorial we learn how to fix mrtg command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.