How To Install netmask on Debian 9

In this tutorial we learn how to install netmask on Debian 9. netmask is helps determine network masks

Introduction

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

What is netmask

netmask is:

This is a tiny program handy if you work with firewalls or routers occasionally (possibly using this as a helper for shell scripts). It can determine the smallest set of network masks to specify a range of hosts. It can also convert between common IP netmask and address formats.

There are three methods to install netmask 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 netmask Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install netmask

Install netmask Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install netmask

Install netmask 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 netmask using aptitude by running the following command:

sudo aptitude -y install netmask

How To Uninstall netmask on Debian 9

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

sudo apt-get remove netmask

Uninstall netmask And Its Dependencies

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

sudo apt-get -y autoremove netmask

Remove netmask Configurations and Data

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

sudo apt-get -y purge netmask

Remove netmask configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge netmask

Dependencies

netmask have the following dependencies:

References

Summary

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