Regenerate resolv.conf from dhclient.conf without releasing/renewing IP?

When I make changes to dhclient.conf such as modifying the DNS search path (so that the changes don't get lost on reboot or DHCP renews), how do I regenerate /etc/resolv.conf? That page suggests dhclient -r; dhclient which releases the address, thus disrupting my connection and preventing me from reaching the host again. Is there another way of doing this? Thanks.

4

1 Answer

Just use your favorite editor to edit /etc/resolv.conf (or /run/resolvconf/resolv.conf if you are running Ubuntu 12.04 or later with resolvconf active).

After a reboot or an interface downup cycle, resolv.conf should be correctly regenerated so that you can reconnect. If that isn't the case then you have another problem.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like