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;
Advertisements

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

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s