How do I Permanently configure the DNS server list in 16.04?
This is an old post at this point, but I had some additional information. If you are running a headless server then the following should come in helpful.
For DHCP Configurations: Modify /etc/network/interfaces. Under your interface (eth0, etc) add the following line:
dns-nameservers 123.123.123.123 # replace with wanted IP
This only APPENDS a DNS server if your DHCP server is already configured to provide you one!!! To OVERRIDE the DHCP server's provided nameserver modify the following file.
/etc/dhcp/dhclient.conf:
supersede domain-name-servers 123.123.123.123 # replace with wanted DNS server
You will then need to restart your network. Something like the following should do. # invoke-rc.d networking restart
Now if you view /etc/resolv.conf you should see only your nameserver(s).
The correct answer for this question is:
Go to the Network icon in the top panel.
Select Edit Connections.
Open the connection that you wish to modify, e. g. Wired Connection.
Select the IPv4 tab.
Set the Method to Automatic (DHCP) addresses only.
In the DNS Servers field, enter a comma-separated list of your DNS servers.
Depending on your version of Ubuntu, if you see a switch called Automatic, switch it to OFF.
Click the Save button.
Do not edit your resolv.conf
file!