I deployed CentOS 7 Linux minimal deployed within the cloud. Nevertheless, I’m unable to seek out the dig command on my newly created CentOS 7 server. It says ‘-bash: dig: command not discovered‘ I attempted yum set up dig, nevertheless it failed. How do I set up dig command on CentOS 7 Linux utilizing the command line?
The dig command is primarily used to question DNS servers. It’s a useful gizmo for community troubleshooting. It’s standard because of its flexibility, easy to make use of, and crystal clear output over host command. This web page reveals the right way to set up dig command on a CentOS Linux 7 utilizing the bash shell. You could log in as root person to put in the next package deal.
CentOS 7 dig command not discovered
You could get the next error once you run dig command:
$ dig www.cyberciti.biz
$ dig +brief myip.opendns.com @resolver1.opendns.com
Attempt to find the dig with kind command:
$ kind -a dig
Show your PATH settings on Linux with assist of echo command:
$ echo “$PATH”
Eliminating “-bash: dig: command not discovered”
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 shouldn’t be put in by default together with the dig command.
You could set up bind-utils package deal. It comprises a set of utilities (reminiscent of dig command and different) for querying DNS title servers to seek out out details about web hosts. These instruments will give you the IP addresses for given host names, in addition to different details about registered domains and community addresses.
The way to set up dig on CentoS 7
You could set up bind-utils if that you must get info from DNS title servers. Use the yum command:
$ sudo yum set up bind-utils
How do I exploit dig command?
The syntax is:
dig @DNS-server-name Hostname
dig @DNS-server-name IPAddress
dig @DNS-server-name Hostname|IPAddress kind
$ dig www.cyberciti.biz
$ dig @220.127.116.11 bash.cyberciti.biz
$ dig @18.104.22.168 MX cyberciti.biz
$ dig @22.214.171.124 AAAA cyberciti.biz
dig command put in on a CentOS Linux 7 and displaying dns output of a question
A tip about discovering package deal names
Wish to discover out which package deal owned dig command on a CentOS Linux 6/7? Strive:
# yum whatprovides ‘*bin/dig’
The above command signifies that /usr/bin/dig command offered by bind-utils package deal.
And there you could have it, dig command put in and dealing appropriately on a CentOS Linux 7. You need to use the identical command on a CentOS Linux 6.x to put in dig command.