linuxsystem-management
systemd-resolved
systemd-resolvedlinuxnetworking
Plain English
systemd-resolved is the part of Ubuntu that looks up website names. Programs ask it, and it asks the real DNS servers and remembers the answers for a while.
Technical Definition
systemd-resolved caches DNS and listens on 127.0.0.53:53. /etc/resolv.conf is a symlink to its stub file.
- resolvectl status shows the upstream servers per link.
- resolvectl query name, resolvectl flush-caches.
- To run your own DNS server (Pi-hole) on port 53, set DNSStubListener=no in /etc/systemd/resolved.conf and point /etc/resolv.conf at /run/systemd/resolve/resolv.conf.
Source: systemd-resolved(8)
systemd-resolved in practice
$ resolvectl status | head
$ resolvectl query ubuntu.com
$ ls -l /etc/resolv.confIn the Wild
When dig works but apps fail, or port 53 is already in use, systemd-resolved is the first thing to check. BNLC Phase 5 and 8.