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:
- Open a terminal window on your CentOS 7 system.
- Update the package list by running the following command:
sudo yum update
- Install the
bind-utils
package, which includes thedig
command, by running the following command:
sudo yum install bind-utils
- 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.