netmask command not found

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

Introduction

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

netmask: command not found

or when using sudo you get the following error message

sudo: netmask: command not found

Solutions to netmask: command not found

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

In Ubuntu netmask is provided by netmask package.

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.

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

sudo apt-get -y install netmask

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

You can also use apt command to install netmask.

sudo apt -y install netmask

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

sudo aptitude install netmask

Summary

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