Jump to content


- - - - -

How to set which DNS / Nameservers to use on Ubuntu and Debian

Debian 7 Ubuntu Server 14.04 Debian 6

  • Please log in to reply
No replies to this topic

#1 Wilson18



  • root
  • 112 posts
  • LocationUniversity of Birmingham

Posted 07 June 2014 - 08:31 PM

In this Tutorial, I will be showing you how to set which dns servers to use. To do this, we will need to set up the resolv file. Depending on if you are ubuntu or debian, the config files location changes slightly. Make sure you get the right one or it wont work and may be overwritten. 


If you are on debian, you will need to use

nano /etc/resolv.conf

But if you are on Ubuntu, you will need to use

nano /etc/resolvconf/resolv.conf.d/base

In this file, you will be okay to delete everything. Once empty, you can set your nameservers like below.


If you see a comment which says about it been generated by Network Manager, it is a good idea to follow this tutorial for How to Disable Network Manager from Starting in Debian as what you enter in here will most likely be reset every time you reboot. 

  • Rolandcalm likes this

List what you read?

Check me out on: YouTube, Twitter, Facebook, Google+

Also tagged with one or more of these keywords: Debian 7, Ubuntu Server 14.04, Debian 6