macOS 10.11、10.12

sudo killall -HUP mDNSResponder

OS X 10.10 Yosemite

sudo discoveryutil mdnsflushcache;sudo discoveryutil udnsflushcaches;say flushed

OS X 10.9 Mavericks

dscacheutil -flushcache;sudo killall -HUP mDNSResponder

OS X Lion (10.7) 和 OS X Mountain Lion (10.8)

'sudo killall -HUP mDNSResponder'

OS X 10.3 和 10.4 Tiger

'lookupd -flushcache'

如果觉得我的文章对你有用,请随意赞赏