Resolv.conf

The /etc/resolv.conf file is used to configure hostname resolution. It may be manually configured by the system administrator, or may be automatically populated by various network configuration tools.

NetworkManager
When using NetworkManager, resolv.conf should be a symlink pointing at /run/NetworkManager/resolv.conf.

systemd-resolved
There are multiple options for setting up a resolv.conf symlink to work with systemd-resolved.

Two main features are supported:


 * Stub resolver: the nameserver is pointed at systemd-resolved, listening on 127.0.0.53. DNS queries are executed by systemd-resolved.
 * Search path: The "search" directive is used to configure default domain names to be used when resolving single-word DNS queries.

The available options/features depend on the version of systemd installed and which target is used for the symlink.

openresolv
The net-dns/openresolv package integrates with several other packages to dynamically update /etc/resolv.conf when network configuration changes occur. When using openresolv, /etc/resolv.conf should be a regular file.