The dig command is not included in the default installation of Red Hat Enterprise Linux 8 (RHEL 8). However, you can install it using the package manager, dnf.
Here’s how to install dig on RHEL 8:
- Log in to the RHEL 8 server as a root user or with
sudoprivileges. - Run the following command to install the
bind-utilspackage, which includes thedigcommand:
dnf install bind-utils
- Once the installation is complete, you can run the
digcommand to perform DNS lookups. For example, to query the IP address for the domainexample.com, you can run the following command:
dig example.com
- To verify that the
digcommand has been installed and is working properly, you can run the following command:
dig -v
This will display the version information for the dig command. If the installation was successful, you should see output indicating the version of dig installed on your system.