In newest Fedora and Centos configuration of dns is in /etc/sysconfig/network-scripts/ifcg-eth0 (or other interface config). So what for is still /etc/resolv.conf needed. Since its no longer used. (I tested this on new fedora 18 instalation and putting dns ipis in resolve.conf didn't work only changing the ifcg file and restart network service)
Linux – What for is /etc/resolv.conf needed in newest Centos and Fedora
centosdomain-name-systemfedoralinuxresolv.conf
Related Topic
- Linux – second ip address on the same interface but on a different subnet
- Linux – Configure a DNS server per nic interface (eth0 / eth1)
- Centos – Setting up routing in CentOS 6.4 as a router/DHCP server with two nics
- CentOS Cannot resolve any hostnames
- Centos – Configure IPv6 – CentOS OVH – Can’t ping
- Linux – binding range of IPs in Centos, not working
- CentOS 7 – /etc/resolv.conf Resetting on Network Restart
Best Answer
/etc/resolv.conf is the system-wide configuration of where to look for DNS, as used by gethostbyname() etc.
http://linux.die.net/man/5/resolv.conf
It is generally overwritten by the network service with the adapter-specific settings given in ifcfg (or provided by DHCP).
So any changes to preferred DNS servers should be made in the ifcfg files rather than resolv.conf to avoid over-writing.