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
sudo
privileges. - Run the following command to install the
bind-utils
package, which includes thedig
command:
dnf install bind-utils
- Once the installation is complete, you can run the
dig
command 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
dig
command 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.