Techolac - Computer Technology News
  • Home
  • Internet
  • Business
  • Computers
  • Gadgets
  • Lifestyle
  • Phones
  • Travel
  • Tech
  • More
    • Automotive
    • Education
    • Entertainment
    • Health
    • SEO
    • Linux
    • WordPress
    • Home Improvement
    • How to
    • Games
No Result
View All Result
  • Home
  • Internet
  • Business
  • Computers
  • Gadgets
  • Lifestyle
  • Phones
  • Travel
  • Tech
  • More
    • Automotive
    • Education
    • Entertainment
    • Health
    • SEO
    • Linux
    • WordPress
    • Home Improvement
    • How to
    • Games
No Result
View All Result
Techolac - Computer Technology News
No Result
View All Result
Home Linux

CentOS 7 dig command not found – How to install dig on CentOS

by Editorial Staff
July 1, 2019
in Linux
Reading Time: 3 mins read

I deployed CentOS 7 Linux minimal deployed in the cloud. However, I am unable to find the dig command on my newly created CentOS 7 server. It says ‘-bash: dig: command not found‘ I tried yum install dig, but it failed. How do I install dig command on CentOS 7 Linux using the command line?

Introduction:
The dig command is primarily used to query DNS servers. It is a useful tool for network troubleshooting. It is popular due to its flexibility, simple to use, and crystal clear output over host command. This page shows how to install dig command on a CentOS Linux 7 using the bash shell. You must log in as root user to install the following package.

 

CentOS 7 dig command not found

You may get the following error when you run dig command:
$ dig www.cyberciti.biz
$ dig +short myip.opendns.com @resolver1.opendns.com

Try to locate the dig with type command:
$ type -a dig
Display your PATH settings on Linux with help of echo command:
$ echo "$PATH"
CentOS 7 dig command not found

Getting rid of “-bash: dig: command not found”

BIND (Berkeley Internet Name Domain) is an implementation of the DNS (Domain Name System) protocols. BIND includes a DNS server (named), which resolves host names to IP addresses; a resolver library and tools for verifying that the DNS server is operating properly. However, bind is not installed by default including the dig command.

You must install bind-utils package. It contains a collection of utilities (such as dig command and other) for querying DNS name servers to find out information about internet hosts. These tools will provide you with the IP addresses for given host names, as well as other information about registered domains and network addresses.

How to install dig on CentoS 7

You must install bind-utils if you need to get information from DNS name servers. Use the yum command:
$ sudo yum install bind-utils
How to install dig on CentOS Linux 7 using yum command

How do I use dig command?

The syntax is:
dig Hostname
dig DomaiNameHere
dig @DNS-server-name Hostname
dig @DNS-server-name IPAddress
dig @DNS-server-name Hostname|IPAddress type

For example:
$ dig www.cyberciti.biz
$ dig @1.1.1.1 bash.cyberciti.biz
$ dig @1.1.1.1 MX cyberciti.biz
$ dig @1.1.1.1 AAAA cyberciti.biz

dig command installed on a CentOS Linux 7 and displaying dns output of a query
dig command installed on a CentOS Linux 7 and displaying dns output of a query

A tip about finding package names

Want to find out which package owned dig command on a CentOS Linux 6/7? Try:
# yum whatprovides '*bin/dig'
Find out which package provides dig command on CentOS Linux
The above command indicates that /usr/bin/dig command provided by bind-utils package.

See also  Check how many CPUs are there in Linux system

Conclusion

And there you have it, dig command installed and working correctly on a CentOS Linux 7. You can use the same command on a CentOS Linux 6.x to install dig command.

[ad_2]

Related Posts

Top Commands to Check the Running Processes in Linux
Linux

Top Commands to Check the Running Processes in Linux

May 27, 2022
4 Tips to Prevent and Troubleshoot the ImagePullBackOff Kubernetes Error
Linux

4 Tips to Prevent and Troubleshoot the ImagePullBackOff Kubernetes Error

March 30, 2022
How Common Signals are Used in Kubernetes Pod Management
Linux

How Common Signals are Used in Kubernetes Pod Management

November 20, 2021

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

IT Staff Augmentation: Best Practices, Different Types, and Challenges

IT Staff Augmentation: Best Practices, Different Types, and Challenges

August 17, 2022
30 Cinecalidad Alternatives To Watch Movies And TV Shows Online

30 Cinecalidad Alternatives To Watch Movies And TV Shows Online

August 16, 2022
Venafi

Top 15 Best Venafi Alternatives In 2022

August 16, 2022
Want Less Risk When Trading Crypto? Use Derivatives

Want Less Risk When Trading Crypto? Use Derivatives

August 16, 2022
virtual reality agencies

Top 15 Virtual Reality Agencies In 2022

August 15, 2022
  • DashTech
  • TechDaddy
  • Terms and Conditions
  • Disclaimer
  • Write for us

© Techolac © Copyright 2019 - 2022, All Rights Reserved.

No Result
View All Result
  • Home
  • Internet
  • Business
  • Computers
  • Gadgets
  • Lifestyle
  • Phones
  • Travel
  • Tech
  • More
    • Automotive
    • Education
    • Entertainment
    • Health
    • SEO
    • Linux
    • WordPress
    • Home Improvement
    • How to
    • Games

© Techolac © Copyright 2019 - 2022, All Rights Reserved.

Go to mobile version