How do get Ubuntu to stop modifying /etc/resolv.conf

1

I want to manually set my resolv.conf and have Ubuntu not automatically change it later.

How do I get Ubuntu to stop modifying resolv.conf?

I have already set "Automatic (DHCP) addresses only" in the network settings.

Neil

Posted 2010-05-17T18:40:14.083

Reputation: 4 761

Question was closed 2013-07-01T12:18:26.713

Answers

1

Broam

Posted 2010-05-17T18:40:14.083

Reputation: 3 831

2

If you are running a recent version of Ubuntu (I run 12.04 at this time), you will notice that /etc/resolv.conf is a symlink. To stop automatic updates to the file, remove the symlink and replace it with a file with the desired static contents.

mshamma

Posted 2010-05-17T18:40:14.083

Reputation: 371

1

apt-get remove resolvconf?

Zed

Posted 2010-05-17T18:40:14.083

Reputation: 451

My question could have been phrased better. I needed to set the priority of DNS servers, so editing dhclient's config file was better. – Neil – 2010-05-17T20:37:41.477

1Removing resolvconf forces removal of ubuntu-minimal, which provides a lot of other barebones utilities, which are recommended to not be removed. – Cerin – 2012-10-14T23:57:11.843