Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My system has this:

 $cat /etc/resolv.conf

But when I booted my system(actually in pristine condition) this search line with wasn't present.

Did the DNS server add it?

And if it did add it then why didnt all the hosts connected to the same DNS get that search param? It happened only on a few.

share|improve this question

migrated from Feb 10 '12 at 16:32

This question came from our site for professional and enthusiast programmers.

What distribution do you use? Each has different config files to change the behaviour of automatic resolv.conf changes. – Nils Feb 11 '12 at 22:23

it is usually the DHCP client that updates /etc/resolv.conf because the DHCP server can push some options such as the domain or the DNSs to the clients.

share|improve this answer

Search domains are typically added to resolve.conf when the system is installed or when dhcpcd receives DNS information while obtaining a DHCP lease.

share|improve this answer
I am getting an invalid search param that is getting added to the resolv.conf. How do I ignore it because now all my domain look-ups are getting suffixed with that string. – Bornfree Feb 9 '12 at 11:35
You could try appending "-C resolv.conf" to the line in your init/rc file which starts the /sbin/dhcpcd. The init files are typically in /etc/init.d or /etc/rc.d. However note that you will need to manually set your DNS servers in your /etc/resolv.conf if you configure dhcpcd to not run the resolve.conf script. Alternatively, you could edit the dhcpcd script which modifies the resolve.conf (possibly located in /lib/dhcpcd/dhcpcd-hooks) to not add a search domain. – David M. Syzdek Feb 9 '12 at 11:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.