Where Is DNS Configured on Linux?
Linux DNS resolver config: /etc/resolv.conf, systemd-resolved stub and NetworkManager interplay.
Last updated
DNS resolution starts at /etc/resolv.conf, often a symlink to systemd-resolved or generated by NetworkManager. Hand edits lose to automation on managed systems.
Trace the symlink before editing. The generator behind it (resolved, NetworkManager, netplan) is the real configuration surface.
Where Linux stores this, by platform
/etc/resolv.conf
May be a stub symlink; check with ls -l first. Manage via resolvectl, NetworkManager or netplan depending on the generator. Docker and VPNs add their own overrides.
Frequently asked questions
Why do my resolv.conf edits keep reverting?
Check whether resolv.conf is a symlink to the systemd stub, then use resolvectl. Direct edits get overwritten by NetworkManager or netplan on many setups.
Notice an outdated path? Let us know.