Linux Tutorials

Ubuntu dig command not discovered – Find out how to set up dig on Ubuntu


I deployed Ubuntu Linux minimal deployed within the cloud. Nevertheless, I’m unable to seek out the dig command on my newly created Ubuntu 18.04 LTS server operating on Google cloud. It says ‘-bash: dig: command not discovered‘ I attempted apt set up dig command, nevertheless it failed. How do I set up dig command on Ubuntu Linux utilizing the command line over ssh?

Introduction: The dig command is primarily used to question DNS servers. It’s a useful gizmo for community troubleshooting. It’s in style as a result of its flexibility, easy to make use of, and crystal clear output over host command. This web page exhibits the best way to set up dig command on a Ubuntu utilizing the bash shell. You could log in as root consumer to put in the next bundle.

Ubuntu dig command not discovered

Please observe that vivek@nixcraft-asus:~$ is the shell immediate. The shell immediate usually ends in a $ signal. So sort all instructions after vivek@nixcraft-asus:~$

You could get the next error if you run dig command:
vivek@nixcraft-asus:~$ dig
vivek@nixcraft-asus:~$ dig +brief
Attempt to find the dig with sort command:
vivek@nixcraft-asus:~$ sort -a dig
Show your PATH settings on Linux with assist of echo command:
vivek@nixcraft-asus:~$ echo “$PATH”
Ubuntu dig command not found

Eliminating “-bash: dig: command not discovered” on Ubuntu

BIND (Berkeley Web Identify Area) is an implementation of the DNS (Area Identify System) protocols. BIND features a DNS server (named), which resolves host names to IP addresses; a resolver library and instruments for verifying that the DNS server is working correctly. Nevertheless, bind is just not put in by default together with the dig command.

You could set up dnsutils bundle on an Ubuntu based mostly system. It incorporates a set of utilities (resembling dig command and different) for querying DNS identify servers to seek out out details about web hosts. These instruments will offer you the IP addresses for given host names, in addition to different details about registered domains and community addresses.

Find out how to set up dig on Ubuntu Linux

You could set up dnsutils if it’s essential get info from DNS identify servers. Use the apt command or apt-get command:
vivek@nixcraft-asus:~$ sudo apt replace
vivek@nixcraft-asus:~$ sudo apt set up dnsutils
How to install dig on Ubuntu Linux using apt-get command

How do I exploit dig command on Ubuntu?

The syntax is as follows:
dig Hostname
dig DomaiNameHere
dig @DNS-server-name Hostname
dig @DNS-server-name IPAddress
dig @DNS-server-name Hostname|IPAddress sort
For instance:
vivek@nixcraft-asus:~$ dig
vivek@nixcraft-asus:~$ dig @
vivek@nixcraft-asus:~$ dig @ MX
vivek@nixcraft-asus:~$ dig @ AAAA
dig command installed on an Ubuntu Linux and displaying dns output of a query dig command put in on an Ubuntu Linux and displaying dns output of a question

A tip about discovering bundle names on Ubuntu

Need to discover out which bundle owned dig command on a Ubuntu Linux 6/7? Attempt:
vivek@nixcraft-asus:~$ apt-cache search dns dig
Find out which package provides dig command on Ubuntu Linux
The above command signifies that /usr/bin/dig command offered by dnsutils bundle on an Ubuntu Linux.


And there you might have it, dig command put in and dealing accurately on a Ubuntu. You should utilize the identical command on a Ubuntu 16.04 or earlier or newest model to put in dig command.

Posted by: Vivek Gite

The creator is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a coach for the Linux working system/Unix shell scripting. Get the newest tutorials on SysAdmin, Linux/Unix and open supply matters by way of RSS/XML feed or weekly e-mail e-newsletter.

Source link

Related Articles

Leave a Reply

Back to top button