How to run nslookup on CentOS

When you try to nslookup any domain in CentOS you might get the following error:

-bash: nslookup: command not found

To run nslookup in CentOS, you have to install bind-utils at first because nslookup is part of it.

Step 1: install bind-utils

yum -y install bind-utils

Step 2: run nslookup

nslookup
>

Step 3: Let check the Domain you want to check
For example:

>google.com
Server: 8.8.8.8
Address: 8.8.8.8#53

Non-authoritative answer:
Server: google.com
Address: 172.217.24.46

Have fun!

Leave a Reply

Your email address will not be published. Required fields are marked *