Last Updated: February 25, 2016
· kayaalpg

Setting name servers via dhclient

Into the /etc/dhclient.conf file, add the following line:

prepend domain-name-servers,; and are DNS servers of Google, replace them with ones you like in case.

The prepend keyword tells dhclient to add these nameservers to the beginning of /etc/resolv.conf. Replace prepend with append if you want them to be appended to, or default if you want them to be overridded with the values dhclient finds.

For more information, see man pages for dhclient.conf, dhclient and resolv.conf.

1 Response
Add your response

Thanks for the tip!

over 1 year ago ·