Jump to content

resolv.conf is overwritten on reboot

Recommended Posts

Just a quick tip:


For those using DHCP clients, you will proably find that on reboots that your resolv.conf is overwritten. To stop this from happening you can:



For dhcpcd its easy, add the option -R to your command line:

# dhcpcd -R


You will need to find the configuration file to edit and add this option to (differs per distro).


For dhcp-client there is a couple of options, the best, imho is to create a file "/etc/dhcp-enter-hooks":

# /etc/dhclient-enter-hooks

make_resolv_conf() {
     echo "doing nothing to resolv.conf"



Thats it... have fun,..

Link to post
Share on other sites
  • 9 months later...
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...