Last Updated: February 25, 2016
·
821
· kayaalpg

Setting name servers via dhclient

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

prepend domain-name-servers 8.8.8.8, 8.8.4.4;

8.8.8.8 and 8.8.4.4 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 ·