Fixing /etc/resolv.conf on Ubuntu

In Ubuntu and many others Linux distro you shouldn’t to edit /etc/resolv.conf, your changes will be lost when your computer restart.

You should modify dhclient.conf instead:

$ sudo vi /etc/dhcp3/dhclient.conf

And add your DNS server (i.e. Google DNS 8.8.8.8) :

prepend domain-name-servers 8.8.8.8;

2 thoughts on “Fixing /etc/resolv.conf on Ubuntu

  1. Hi my friend Sergio,

    Thank you very much for sharing this information.

    In fact ArchLinux config is very simple, they try to reduced confusion.

    Best Regards,

    Alan

Leave a reply to Sérgio Cancel reply