How to Configure /etc/hosts, /etc/resolv.conf and DNS Resolution on RHEL 9
DNS resolution on a Linux server is a multi-layered system. When an application calls getaddrinfo(“example.com”), the request passes through the Name Service Switch (NSS) framework, which consults sources in the order defined in /etc/nsswitch.conf — typically /etc/hosts first, then a DNS resolver. The DNS resolver reads its configuration from /etc/resolv.conf, which lists the DNS servers […]