check dns server in linux

To check the DNS server in Linux, you can use the nslookup command. Here's how you can do it:

  1. Open a terminal window.
  2. Type the following command and press Enter: nslookup.
  3. You will now see a prompt where you can enter the domain name or IP address you want to check. For example, if you want to check the DNS server for the domain "example.com", type example.com and press Enter.
  4. The nslookup command will display the IP address of the DNS server responsible for resolving the domain name you entered.

That's it! You have now checked the DNS server in Linux using the nslookup command.