See which DNS servers you're using

Show the per-connection resolver settings that systemd-resolved is actually applying.

Linuxnetworkresolversystemd-resolvedDNSLow risk
Run resolvectl status and look at the 'DNS Servers' line for your active interface — that's the resolver your system queries.

01Command

Command
$ resolvectl status | grep -A2 'DNS Servers'

02What it does

Modern Ubuntu and Fedora don't read /etc/resolv.conf the old way; systemd-resolved manages DNS per link, and resolvectl status reveals it. This answers 'why is my Pi-hole/AdGuard DNS not working?' — you can see instantly whether your custom server is listed under the right interface or whether the router's DNS is still being used. Global DNS appears at the top; per-link servers below each interface.

03Risk

RiskLow risk
Requirementssystemd-resolved (default on Ubuntu/Fedora); on other distros use cat /etc/resolv.conf
!Warning: On distros without systemd-resolved this command doesn't exist — check /etc/resolv.conf instead; per-link DNS only overrides global DNS for domains matched by the link's search domains.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • resolvectl(1) — manual page
    Arch Linux · community · 2026-09-17
    Evidence: resolvectl status shows the DNS servers and domains configured per link by systemd-resolved.
  • systemd-resolved — Arch Wiki
    Arch Linux · community · 2026-09-17
    Evidence: resolvectl status is the way to inspect which DNS servers systemd-resolved is using per interface.

Last verified: 2026-09-18 · Category: Network

06Related solutions