DNS Search Domain Debugging With systemd-resolved
Check Which Layer Is Injecting The Search Domain # 1. Is /etc/resolv.conf managed by systemd-resolved? ls -l /etc/resolv.conf # Expected: /etc/resolv.conf -> /run/systemd/resolve/stub-resolv.conf # 2. Show all search domains (global and per-link) resolvectl domain # Look for "Link <N> (<iface>): <domain>" — not just Global section # 3. What does the active resolver actually show? grep '^search' /etc/resolv.conf || echo "no search line" # 4. Which interface is injecting the domain? resolvectl domain | grep -B1 '\.' # 5. Is DHCP the source? networkctl status eth0 | grep -i domain The Three Layers Layer Inspect With Fix Netplan grep -R "search:" /etc/netplan/ Edit yaml, netplan generate, netplan apply systemd-resolved (global) resolvectl domain (Global:) resolvectl domain "" systemd-resolved (per-link) resolvectl domain (Link N:) resolvectl domain eth0 "" Runtime Fix (Per-Link Domain) Clearing a per-link search domain without restarting systemd-resolved: ...