配置 DNS 伺服器以進行域名解析

檔案:/etc/resolv.conf 包含用於域名解析的 DNS 伺服器列表

該檔案的示例內容:

nameserver 8.8.8.8 # IP address of the primary name server
nameserver 8.8.4.4 # IP address of the secondary name server

如果是內部 DNS 伺服器,你可以使用 dig 命令驗證此伺服器是否正確解析 DNS 名稱:

$ dig google.com @your.dns.server.com +short