Wikipedia

resolv.conf

resolv.conf is the name of a computer file used in various operating systems to configure the system's Domain Name System (DNS) resolver. The file is a plain-text file usually created by the network administrator or by applications that manage the configuration tasks of the system. The resolvconf program is one such program on FreeBSD or other Unix machines which manages the resolv.conf file.

Purpose

In most Unix-like operating systems and others that implement the BIND Domain Name System (DNS) resolver library, the resolv.conf configuration file contains information that determines the operational parameters of the DNS resolver. The DNS resolver allows applications running in the operating system to translate human-friendly domain names into the numeric IP addresses that are required for access to resources on the local area network or the Internet. The process of determining IP addresses from domain names is called resolving.

Contents and location

The file resolv.conf typically contains directives that specify the default search domains used for completing a given query name to a fully qualified domain name when no domain suffix is supplied. It also contains a list of IP addresses of nameservers for resolution. Additional name server directives after the first are only used when the first or last used server is unavailable. An example file is:

search example.com local.test nameserver 1.1.1.1 nameserver 8.8.8.8 nameserver 9.9.9.10 

resolv.conf is usually located in the directory /etc of the file system. The file is either maintained manually, or when DHCP is used, it is usually updated with the utility resolvconf.

In systemd based Linux distributions using systemd-resolved.service, /etc/resolv.conf is a symlink to /run/systemd/resolve/stub-resolv.conf.[1]

See also

  • Hosts (file)
  • nsswitch.conf
  • resolved.conf[2]
  • systemd-resolved

References

External links

This article is copied from an article on Wikipedia® - the free encyclopedia created and edited by its online user community. The text was not checked or edited by anyone on our staff. Although the vast majority of Wikipedia® encyclopedia articles provide accurate and timely information, please do not assume the accuracy of any particular article. This article is distributed under the terms of GNU Free Documentation License.

Copyright © 2003-2025 Farlex, Inc Disclaimer
All content on this website, including dictionary, thesaurus, literature, geography, and other reference data is for informational purposes only. This information should not be considered complete, up to date, and is not intended to be used in place of a visit, consultation, or advice of a legal, medical, or any other professional.