Edit your /etc/network/interfaces
with the correct settings.
sudo nano /etc/network/interfaces
Then restart your network device:
sudo ifdown eth0 && sudo ifup eth0
The resolv.conf
will be recreated with the correct settings.
You can put the following in your hosts file if you want the defaults back:
127.0.0.1 localhost
127.0.1.1 hostname
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
The second line is only needed if your pc has a name. (Don't forget to substitue the name).
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
. See https://askubuntu.com/questions/130452/how-do-i-add-a-dns-server-via-resolv-conf/130459#130459 – user.dz Jun 12 '14 at 10:12