CentOS 8 dig command not found – How to install dig on CentOS 8
The dig command is not installed by default on CentOS 8, but it can be easily installed using the package manager. Here are the steps to install dig on CentOS 8:
- Update the package manager: Run the following command to update the package manager and ensure that it has the latest package information:
sudo dnf update- Install the
bind-utilspackage: Thedigcommand is part of thebind-utilspackage, which can be installed using the following command:
sudo dnf install bind-utils- Verify the installation: Run the following command to verify that the
digcommand is installed and working properly:
digYou should see the usage information for the dig command.
- Start Using the dig command : You can now use the
digcommand to query DNS servers for information. For example, you can use the following command to query the DNS server for the IP address of the domaingoogle.com:
dig google.comAlternatively, you can also use the nslookup command to query the DNS server.
Note : If you're using firewall make sure to allow the port 53 to allow DNS query.
