Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to prevent /etc/resolv.conf from getting overwritten after reboot in Ubuntu 11.10? [closed]

I'm using Ubuntu 11.10 and I manually configure DNS servers in /etc/resolv.conf but it gets somehow overwritten after I reboot. How can I prevent this?

Thanks.

like image 542
mkhezr Avatar asked Dec 01 '22 04:12

mkhezr


1 Answers

As you can read in the header of resolv.conf :

Dynamic resolv.conf file for glibc resolver generated by resolvconf

So, the resolv.conf is generated, if you want to keep the resolvconf configuration after reboot, you will have to edit /etc/resolvconf/resolv.conf.d/base. In that file, put in your info as you would in resolv.conf.

nameserver 8.8.8.8

Then regenerate resolv.conf with resolvconf:

sudo resolvconf -u
like image 189
Abdallah Ben Salem Avatar answered Dec 06 '22 03:12

Abdallah Ben Salem