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.
Step 2: Start the `nslookup` Command
Next, you need to start the nslookup command by typing the following command in your terminal:
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:
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:
Replace example.com with the domain name you want to query.
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: 18.104.22.168 Address: 22.214.171.124#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.
- nslookup – Start the nslookup command prompt
- set type=NS – Set the query type to NS
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.