Inspect and troubleshoot DNS resolution on systemd systems with a hands-on command. 22.06.2026 | reading time: 2 min What does `systemd-resolve` do and why should the administrator care? It is a focused tool to query the systemd stub resolver and to inspect how names are resolved on a machine, which makes it invaluable for fast DNS troubleshooting. Quick live example Try a simple query and a status check to see where answers come from; the commands below show a name lookup and the resolver status in one go: ``` $ systemd-resolve example.com example.com: 93.184.216.34 -- Information acquired via DNS in 42.3ms. -- Data is authenticated: no $ systemd-resolve --status Global DNS Servers: 192.0.2.53 Link 2 (eth0) Current Scopes: DNS DNS Servers: 192.0.2.53 ``` What to do next If a name fails, run `systemd-resolve --status` to find which link and server answered, then `systemd-resolve --flush-caches` to clear stale entries; use `systemd-resolve --cache-show` to inspect cached records and `systemctl status systemd-resolved` to check the resolver service. Deeper uses and limits `systemd-resolve` can also set per-link DNS with `--set-dns` when integrated with systemd-networkd, but note that on newer systems `resolvectl` is the preferred front-end; also remember many distributions still use NetworkManager or a static `/etc/resolv.conf`, so results depend on how name resolution is wired on the host. Where this fits Use `systemd-resolve` for quick on-box diagnostics, combine it with packet captures when needed, and switch to `resolvectl` for newer systemd versions; mastering these tools speeds up troubleshooting in production and lab environments. Keep exploring DNS behavior across link and global scopes, and map resolver behavior to service configuration to avoid surprises during deployment; then practice with labs and exam-style tasks to solidify skills. Join Bits & Bytes Academy First class LINUX exam preparation. network troubleshooting utilities