摘要:
1、DNS配置文件/etc/hosts 这个是最早的 hostname 对应 IP 的档案;/etc/resolv.conf :这个重要!就是 ISP 的 DNS 服务器 IP 记录处;/etc/nsswitch.conf:这个档案则是在『决定』先要使用 /etc/hosts 还是/etc/resolv.conf 的设定!一般而言, Linux 的预设主机名与 IP 的对应搜寻都以 /etc/hosts 为优先,2、DNS相关命令root@ubuntu:~# dig +tracewww.baidu.comDNS 的正、反解查询指令: host, nslookup, digroot@ubuntu 阅读全文