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:
- Open a terminal window.
- Type the following command and press Enter:
nslookup
. - 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. - 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.