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:

  1. 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
  1. Install the bind-utils package: The dig command is part of the bind-utils package, which can be installed using the following command:
sudo dnf install bind-utils
  1. Verify the installation: Run the following command to verify that the dig command is installed and working properly:
dig

You should see the usage information for the dig command.

  1. Start Using the dig command : You can now use the dig command 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 domain google.com:
dig google.com

Alternatively, 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.

Leave a Comment