dnsmasq command not found

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

Introduction

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

dnsmasq: command not found

or when using sudo you get the following error message

sudo: dnsmasq: command not found

Solutions to dnsmasq: command not found

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

In Ubuntu dnsmasq is provided by dnsmasq-base-lua package.

dnsmasq-base-lua is:

This package contains the dnsmasq executable and documentation, but not the infrastructure required to run it as a system daemon. For that, install the dnsmasq package. This package is an alternative to dnsmasq-base which includes the LUA interpreter.

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

sudo apt-get -y install dnsmasq-base-lua

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

You can also use apt command to install dnsmasq-base-lua.

sudo apt -y install dnsmasq-base-lua

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

sudo aptitude install dnsmasq-base-lua

Summary

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