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.
When using NetworkManager, /etc/resolv.conf should be a symlink pointing at /run/NetworkManager/resolv.conf.
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.
|Symlink target||Stub resolver||Search path||< systemd-234||systemd-234/235||>= systemd-236|
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.