The proper way to edit resolv.conf if to add
nameserver xxx.xx.xxx.xxx lines to either base, head, or tail files in
/etc/resolvconf/resolv.conf.d . They belong to root, but you can edit them with sudo ( or gksu if you prefer graphical text editors ).
Although you ask for editing resolv.conf, there's another way to sent dns in ubuntu that doesn't involve resolv.conf. Look at the line 18 of my
/etc/dhcp/dhclient.conf file. Line 19 is also a practical way to do it.
1 # Configuration file for /sbin/dhclient, which is included in Debian's
2 # dhcp3-client package.
4 # This is a sample configuration file for dhclient. See dhclient.conf's
5 # man page for more information about the syntax of this file
6 # and a more comprehensive list of the parameters understood by
7 # dhclient.
9 # Normally, if the DHCP server provides reasonable information and does
10 # not leave anything out (like the domain name, for example), then
11 # few changes must be made to this file, if any.
13 option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
14 #send host-name "andare.fugue.com";
15 send host-name = gethostname();
16 #send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
17 #send dhcp-lease-time 3600;
18 supersede domain-name-servers 188.8.131.52,184.108.40.206,220.127.116.11;
19 # prepend domain-name-servers 18.104.22.168,22.214.171.124;
20 request subnet-mask, broadcast-address, time-offset, routers,
21 domain-name, domain-name-servers, domain-search, host-name,
22 dhcp6.name-servers, dhcp6.domain-search,
23 netbios-name-servers, netbios-scope, interface-mtu,
24 rfc3442-classless-static-routes, ntp-servers,
This sets my dns and lets me browse webs (and nnm-tool command confirms all three dns are used) no matter what i write in my resolv.conf. So try this