How To Find Primary Dns Server Linux?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can find the primary DNS server on your Linux machine by using the ‘cat/etc/resolv.conf’ command in the terminal. This will show the DNS server that is currently being used.
1. Using the Nslookup Command:
Open a terminal window and type “nslookup”. This will present you with the nslookup prompt. Type in “set type=ns” and press Enter. Then type in the domain name you are trying to look up and press Enter. This will return the primary DNS server for that domain.
2. Using the dig Command:
Open a terminal window and type “dig”. This will present you with the dig prompt. Type in “@<DomainName>” and press Enter. This will return the primary DNS server for that domain.