dig command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
dig: command not found
or when using sudo you get the following error message
sudo: dig: command not found
Solutions to dig: command not found
How To Fix dig: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu dig is provided by bind9-dnsutils package.
bind9-dnsutils is:
The Berkeley Internet Name Domain (BIND 9) implements an Internet domain name server. BIND 9 is the most widely-used name server software on the Internet, and is supported by the Internet Software Consortium, www.isc.org.
This package delivers various client programs related to DNS that are derived from the BIND 9 source tree.
- dig - query the DNS in various ways
- nslookup - the older way to do it
- nsupdate - perform dynamic updates (See RFC2136)
To fix this problem, we can install more using the command below.
sudo apt-get -y install bind9-dnsutils
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install bind9-dnsutils.
sudo apt -y install bind9-dnsutils
Or if you have aptitude installed you can use the following command.
sudo aptitude install bind9-dnsutils
Summary
In this tutorial we learn how to fix dig command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.