/etc/hosts
, /etc/networks
)/etc/nsswitch.conf
控制查询顺序hosts: files dns
host www.linuxcast.net
dig www.linuxcast.net
nslookup
host
, dig
都不会使用/etc/nsswitch.conf
的配置, 只会通过/etc/resolv.conf
进行dns查询.dscacheutil -flushcache
sudo killall -HUP mDNSResponder