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

The dig command is not installed by default on CentOS 7. However, it can be easily installed using the package manager yum.

Here are the steps to install the dig command on CentOS 7:

  1. Open a terminal window on your CentOS 7 system.
  2. Update the package list by running the following command:
sudo yum update
  1. Install the bind-utils package, which includes the dig command, by running the following command:
sudo yum install bind-utils
  1. Verify that the dig command is installed by running the following command:
dig --version

The output will show the version of the dig command that is installed on your system.

After the installation is finished, you can use the command dig to lookup DNS information. For example, you can use dig example.com to lookup the DNS information for the domain example.com.

If the command is not found, try logging out and logging back in, or restarting your machine for the changes to take effect.

Leave a Comment