根據Mac OS X操做系統的版本選擇如下命令:api
Mac OS X 12 (Sierra) and later:緩存
sudo killall -HUP mDNSResponder sudo killall mDNSResponderHelper sudo dscacheutil -flushcache
Mac OS X 11 (El Capitan) and OS X 12 (Sierra):操作系統
sudo killall -HUP mDNSResponder
Mac OS X 10.10 (Yosemite), Versions 10.10.4+:code
sudo dscacheutil -flushcache sudo killall -HUP mDNSResponder
2018.6dns