/etc/resolv.conf

About this task

To specify the DNS domain and servers:

Procedure

  1. Edit the file /etc/resolv.conf.
  2. 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.
  3. The /etc/resolv.conf file should specify the domain name suffix to use when a hostname is not fully qualified.
  4. 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 machines Discover.com with two DNS servers:
    
    search machines.Discover.com
    nameserver 172.16.0.5
    nameserver 172.16.0.6