Contains the nameservers to use for DNS
/etc/resolv.conf file is a configuration file that specifies how a computer should resolve domain names (e.g.,
www.example.com) into IP addresses. It is used by the Domain Name System (DNS) resolver in the operating system to determine the IP address of a domain name.
The file typically contains a list of one or more DNS servers that the computer should use to resolve domain names. These DNS servers are usually provided by the internet service provider (ISP) or the network administrator. The file may also contain other options that affect how domain names are resolved, such as the search domain, which is a domain name used to complete unqualified hostnames.
Here is an example of a
nameserver 18.104.22.168 nameserver 22.214.171.124 search example.com
In this example, the file specifies that the computer should use Google's DNS servers at
126.96.36.199 to resolve domain names. It also specifies that the search domain is
example.com, which means that unqualified hostnames will be completed with example.com before being sent to the DNS server for resolution.
It is important to note that the
/etc/resolv.conf file is usually managed by the operating system or other software, and manual edits to the file may be overwritten or ignored. In some cases, the DNS configuration may be managed through other means, such as network configuration tools or DHCP options.