How To Install nethogs on Debian 9

In this tutorial we learn how to install nethogs on Debian 9. nethogs is Net top tool grouping bandwidth per process

Introduction

In this tutorial we learn how to install nethogs on Debian 9.

What is nethogs

nethogs is:

NetHogs is a small ’net top’ tool. Instead of breaking the traffic down per protocol or per subnet, like most tools do, it groups bandwidth by process. NetHogs does not rely on a special kernel module to be loaded.

There are three methods to install nethogs on Debian 9. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install nethogs Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install nethogs using apt-get by running the following command:

sudo apt-get -y install nethogs

Install nethogs Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install nethogs using apt by running the following command:

sudo apt -y install nethogs

Install nethogs Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install nethogs using aptitude by running the following command:

sudo aptitude -y install nethogs

How To Uninstall nethogs on Debian 9

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

sudo apt-get remove nethogs

Uninstall nethogs And Its Dependencies

To uninstall nethogs and its dependencies that are no longer needed by Debian 9, we can use the command below:

sudo apt-get -y autoremove nethogs

Remove nethogs Configurations and Data

To remove nethogs configuration and data from Debian 9 we can use the following command:

sudo apt-get -y purge nethogs

Remove nethogs configuration, data, and all of its dependencies

We can use the following command to remove nethogs configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge nethogs

Dependencies

nethogs have the following dependencies:

References

Summary

In this tutorial we learn how to install nethogs package on Debian 9 using different package management tools: apt, apt-get and aptitude.