/etc/resolv.conf
Cheat sheet · https://pcornel.dk/topic.php?topic=2789
Answer
/etc/resolv.conf lists the DNS servers (nameserver), search domains (search) and options (timeout, attempts, ndots) used by the resolver. It is often managed by systemd-resolved or NetworkManager.
Remember
Check whether it is a symlink (ls -l /etc/resolv.conf) — if managed, change DNS in NetworkManager, netplan or resolved instead. Only the first three nameservers are used.
First checks
resolvectl status— DNS servers per link (systemd-resolved)cat /etc/resolv.conf— configured nameserversgetent hosts <name>— resolution through the system path (nsswitch)dig <name> @<server>— query a specific server
Commands
resolvectlnmcli connection modify ... ipv4.dnsresolvectl status
Verify in this order
tool writes resolv.conf → glibc reads nameservers, search and options → queries sent
Where it usually breaks
First mismatch in link/interface → address/namespace → route/neighbor → firewall/policy → socket/daemon → DNS/TLS/SSH/application peer path; preserve identity/native diagnostic/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2789