How to Find the DNS Servers using the Nslookup Command

DNS (Domain Name System) is a critical component of the internet that translates domain names into IP addresses. Sometimes, you may need to find out which DNS servers are used for a particular domain. In this guide, we will show you how to use the nslookup command to find the DNS servers for a domain.

Step 1: Open the Terminal

First, you need to open the terminal on your Linux system. You can do this by searching for the terminal in your application launcher or by pressing Ctrl + Alt + T on your keyboard.

See also  How to Kill Processes on a Fedora 16 Server

Step 2: Start the `nslookup` Command

Next, you need to start the nslookup command by typing the following command in your terminal:

nslookup

This command will start the nslookup command prompt.

Step 3: Set the Query Type to NS

Now, you need to set the query type to NS (Name Server). This will tell nslookup to return the DNS servers for the specified domain. To do this, type the following command at the nslookup prompt:

set type=NS

Step 4: Query the Domain Name

Finally, you need to query the domain name for which you want to find the DNS servers. To do this, type the domain name at the nslookup prompt:

example.com

Replace example.com with the domain name you want to query.

See also  How to Install MySQL 5.5 Database on CentOS 6.2 using Remi Repository

Step 5: View the DNS Servers

nslookup will now display the DNS servers for the specified domain. The output will look similar to the following:

Server:         8.8.8.8
Address:        8.8.8.8#53

Non-authoritative answer:
example.com     nameserver = ns1.example.com.
example.com     nameserver = ns2.example.com.

Authoritative answers can be found from:

The output shows the DNS servers for the domain example.com. In this case, the DNS servers are ns1.example.com and ns2.example.com.

Commands Mentioned:

  • nslookup – Start the nslookup command prompt
  • set type=NS – Set the query type to NS

Conclusion

In this guide, we have shown you how to use the nslookup command to find the DNS servers for a domain. By following these steps, you can quickly and easily determine which DNS servers are used for a particular domain. We hope this guide has been helpful to you. If you have any comments or suggestions for improvements, please feel free to share them below.

Comments

Leave a Reply

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