RESOLVCONF(8) resolvconf RESOLVCONF(8)
for notifying applications of changes in that information. Resolvconf thus sets itself up as the intermedi‐
ary between programs that supply nameserver information and applications that use that information.
below for a discussion of the available options.
SUPPLIERS OF NAMESERVER INFORMATION
ifdown, NetworkManager(8), dhclient(8), and pppd(8); and by local nameservers such as dnsmasq(8). These pro‐
grams obtain nameserver information from some source and push it to resolvconf.
its negotiation with the DHCP server; if so, its hook script /etc/dhcp/dhclient-enter-hooks.d/resolvconf
pushes this information to resolvconf.
faces. To make ifup push nameserver information to resolvconf when it configures an interface the adminis‐
trator must add dns- option lines to the relevant iface stanza in interfaces(5). The following option names
are accepted: dns-nameserver, dns-search, and dns-sortlist.
tiple nameserver addresses, include multiple such dns-nameserver lines.
arated by spaces.
dns-search foo.org bar.com
a static /etc/resolv.conf file,
work/interfaces(5) as just described;
is not normally necessary or advisable.
CONSUMERS OF NAMESERVER INFORMATION
service. Subscriber packages that need to know when nameserver information has changed should install a
script in /etc/resolvconf/update.d/ (or in /etc/resolvconf/update-libc.d/: see below). For example, DNS
caches such as dnsmasq(8) and pdnsd(8) subscribe to the notification service so that they know whither to
forward queries. Client hook scripts will find the files containing nameserver information in the current
resolver(3). This library is used by many applications that need to resolve domain names. When nameserver
information is updated, the script /etc/resolvconf/update.d/libc generates a new version of the resolver con‐
figuration file, /run/resolvconf/resolv.conf, as described below. If the new version of the file differs
from the previously generated one then the hook scripts found in /etc/resolvconf/update-libc.d/ are executed.
conf/resolv.conf.d/head and ends with the contents of /etc/resolvconf/resolv.conf.d/tail. Between head and
tail the libc script inserts dynamic nameserver information compiled from, first, information provided for
configured interfaces; second, static information from /etc/resolvconf/resolv.conf.d/base. Specifically, it
ronment variable is affirmatively set, as discussed in the ENVIRONMENT VARIABLES section;
ensure that /etc/resolv.conf is a symbolic link to /run/resolvconf/resolv.conf. This link is normally cre‐
ated on installation of the resolvconf package. The link is never modified by the resolvconf program itself.
If you find that /etc/resolv.conf is not being updated, please check to make sure that the link is intact.
that reads /etc/resolv.conf (and most of them do, in order to be compatible) should work fine with resolv‐
script in /etc/resolvconf/update-libc.d/ rather than in /etc/resolvconf/update.d/. (For example, two pack‐
ages that install update-libc.d/ hook scripts are fetchmail and squid.) This is important for synchroniza‐
tion purposes: scripts in update-libc.d/ are run after resolv.conf has been updated; the same is not neces‐
sarily true of scripts in update.d/.
option is used the information must be provided to resolvconf on its standard input in the format of
the resolv.conf(5) file. Each line in the file must be terminated by a newline.
It is conventionally formed from IFACE, the name of the interface involved, a dot, and IPROG, the name of the
interface configuration program, e.g., “eth0.dhclient”.
updates are enabled.
-d or -u. If a delayed update was scheduled then run update scripts.
exist you will have to create it.
the resolvconf-generated resolver configuration file. Set to “no” to prevent the printing of this
message. The default is “yes”.
server address that is a loopback address. (In IPv4 a loopback address is any one that starts with
“127.”. In IPv6 the loopback address is “::1”.)
unnecessary changes to resolv.conf and thus reduces the number of instances in which the
update-libc.d/ scripts have to be run. When an interface is brought up or down the local caching
nameserver that listens on the loopback address is still informed of the change and adapts accord‐
ingly; the clients of the resolver which use the local caching nameserver do not need to be notified
of the change. A disadvantage of this mode of operation is that applications have no secondary or
tertiary nameserver address to fall back on should the local caching nameserver crash. Insofar as a
local nameserver crash can be regarded as an unlikely event, this is a relatively minor disadvantage.
Set to “no” to disable truncation. The default is “yes”.
figuration file even when no interfaces are configured.
a comment line.
this an empty file. This file is a good place to put a resolver options line if one is needed, e.g.,
effect on the functioning of resolvconf; it is retained so that /etc/resolv.conf can be restored to
its original state if the resolvconf package is removed.
tion of the resolvconf package; this ensures that nameservers reachable before installation of resolv‐
conf are still reachable after installation of resolvconf even though at that point not all suppliers
of nameserver information may have supplied their information to resolvconf(8).
conf/resolv.conf.d/ from tail to original so that the contents of original are always added to the end
of the dynamically generated file.
firstname.lastname@example.org> with contributions by Nathan Stratton Treadway.
This is free software; see the source for copying conditions.
man 8 resolvconf, version 1.78ubuntu4