/etc/resolv.conf
About this task
To specify the DNS domain and servers:
Procedure
- Edit the file
/etc/resolv.conf
. - When DHCP is enabled for a network interface, the file
/etc/resolv.conf
is automatically generated by the DHCP client program with the DNS servers specified by the DHCP server.- You normally edit
/etc/resolv.conf
only when using fixed (static) IP addresses.
- You normally edit
- The
/etc/resolv.conf
file should specify the domain name suffix to use when a hostname is not fully qualified. - You must also specify the name of at least one DNS server
to use for hostname and IP resolution. Below is an example of
/etc/resolv.conf
for the domain machinesDiscover.com
with two DNS servers:search machines.Discover.com nameserver 172.16.0.5 nameserver 172.16.0.6