0

I made these changes to resolv.conf today and when i restarted my laptop i cannot connect to the internet. It says server cant be found. These commands were given to me by unoDNS when trying to delete it from my system.

sudo mv /etc/resolv.conf /etc/resolv.conf.bak
echo "nameserver 8.8.8.8" | sudo tee  /etc/resolv.conf
echo "nameserver 8.8.4.4" | sudo tee -a /etc/resolv.conf

Any suggestions as to what went wrong. I am using Ubuntu 14.04 LTS.

Xweque
  • 1,103

2 Answers2

3

When you did sudo mv /etc/resolv.conf /etc/resolv.conf.bak you removed what was probably the symbolic link to the dynamically generated file /run/resolvconf/resolv.conf.

To restore the symbolic link do the following

sudo dpkg-reconfigure resolvconf

and then reboot.

jdthood
  • 12,625
3

Your system use resolvconf and the file resolv.conf is generated dynamically. To properly update the nameserver you can put the dns parameters in:

/etc/network/interfaces

auto eth0
iface eth0 inet static
 address 1.1.1.1
 netmask 255.255.255.0
 gateway 1.1.1.2
 dns-names 8.8.8.8

or Menu > Settings > Network > Wired > Edit > IPv4 > DNS > Server: 8.8.8.8 and then reboot.