下面记录了多个系统与客户端更新/清除缓存的操作.
Windows
点击开始菜单选择运行,输入cmd
:
ipconfig /flushdns
如果你看到输出Successfully flushed the DNS Resolver Cache
或者有success
字眼说明成功了.
如果没有看到,或者提示一些错误,那么:
- 右击我的电脑,选择服务
- 找到
DNS-client
服务 - 右击它选择重启或者开启
Ubuntu,Debian,Mint,Knoppix...
终端中输入:
sudo /etc/init.d/networking restart
如果没有输出成功或者输出了错误:
sudo apt install nscd
sudo /etc/init.d/nscd restart
СentOS
nscd -i hosts
service nscd restart
Mac OS
不同版本需要执行不同的命令:
# 10.9以下
sudo killall -HUP mDNSResponder
# 10.10.1-3
sudo discoveryutil mdnsflushcache
# mac_10.10.4以上
sudo killall -HUP mDNSResponder
Chrome
地址栏输入:
chrome://net-internals/#dns
找到clear host
按钮点击一下就就好了.