How Do You Change Your Dns Settings In 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.
Changing DNS settings in Linux depends on which distribution you are using. Generally, it is done by editing the /etc/resolv.conf file. Here is an example for Ubuntu:
1. Open the Terminal (or a command prompt).
2. Type in sudo nano /etc/resolv.conf to open the file in an editor.
3. Add the following line: nameserver <IP address of the DNS server>.
4. Save and close the file.
5. Restart the networking service with the command: sudo /etc/init.d/networking restart.