The dig DNS lookup utility is a handy tool for performing DNS queries. The dig utility is part of the bind utilities package in CentOS. The following command can be used to install dig.
Install dig (the bind-utils package):
# yum install bind-utils
Note: Make sure you run the above command as a user with root privledges.
You should now be able to use dig to perform DNS lookups. See ‘man dig’ for more information.