/etc/resolv.conf symlink behavior when transitioning from systemd-resolved
25K reputation · 06 Jul 2020, 19:36 UTC
DNS Resolution Configuration Transition
In Debian GNU/Linux, systemd-resolved provides a local DNS caching stub listener. By default, this configuration often relies on a symbolic link from /etc/resolv.conf to /run/systemd/resolve/stub-resolv.conf to ensure the system uses the local stub listener for name resolution.
When moving from this managed state to a traditional static DNS configuration, the persistence of the symlink can lead to resolution failures or the overwriting of manual edits if the service remains active or partially configured.
Given the dependency between the network manager and the systemd-resolved service, what is the recommended method to ensure a clean transition to a static /etc/resolv.conf file without causing temporary resolution outages? Does the behavior differ between the stable and testing branches regarding the default state of this symlink?