Super User is a question and answer site for computer enthusiasts and power users. 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

I just installed a new VM, and looked in the resolve.conf file , in order to check on some issues related to DNS resolution.

$ more /etc/resolv.conf
; generated by /sbin/dhclient-script

I noticed that , somehow, the resolv.conf is smart enough to add the "search" line, which is appropriate. I always assumed that our networking folks edited startup files for us... But now, I'm realizing that maybe there is some sophisticated logic to how the resolv.conf get auto created by the OS networking utilities on startup.

So my question is : How is it that resolv.conf is first initialized in linux ? Are there specific programs that run in the kernel that set the parameters for resolv.conf ?

Thanks! And please forgive my ignorance - im more of a software developer than a systems guy.... but im trying to catch up.

share|improve this question

migrated from Nov 2 '11 at 20:24

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

This is off-topic for SO, but the answer is: You're set up to use a dynamic IP and the DHCP server for your network responds with all that info (along with the IP address for your machine). – Brian Roach Nov 2 '11 at 16:29
The comment in the second line says it all. – Maxim Egorushkin Nov 2 '11 at 16:52
Wow -- it seems like a very relevant question because many coders , like me, must nowadays develop against a VM and know how the VM is setting its network up, so that they can reliably connect to it from a host machine. I would plead others to keep it open. – jayunit100 Nov 2 '11 at 18:13
up vote 5 down vote accepted

Your local DHCP server has been configured with those settings, and sends them to every client when it gives out an IP address.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .