如何刷新Win,Mac和Linux计算机上的DNScaching?
视窗
ipconfig /flushdns
Mac(OS X 10.5)
dscacheutil -flushcache
Linux的
如果您使用nscd :
nscd -i hosts
在Windows中,您可以使用以下命令closures客户端DNScaching:
net stop dnscache
它会停止DNScaching服务。 它将在下次重新启动时重新启动。
这就是Google回答的:
刷新Microsoft Windows中的DNScaching(Win XP,Win ME,Win 2000): –
- Start -> Run -> type cmd - in command prompt, type ipconfig /flushdns - Done! You Window DNS cache has just been flush.
要在Linux中刷新DNScaching,请重新启动nscd守护程序: –
- To restart the nscd daemon, type /etc/rc.d/init.d/nscd restart in your terminal - Once you run the command your linux DNS cache will flush.
刷新Mac OS X Leopard中的DNScaching:
- type lookupd -flushcache in your terminal to flush the DNS resolver cache. ex: bash-2.05a$ lookupd -flushcache - Once you run the command your DNS cache (in Mac OS X) will flush.
在Mac OS X中刷新DNScaching:
- type dscacheutil -flushcache in your terminal to flush the DNS resolver cache. ex: bash-2.05a$ dscacheutil -flushcache - Once you run the command your DNS cache (in Mac OS X Leopard) will flush.
Ubuntu默认不安装cachingDNS服务器。 鉴于您的路由器或ISP正在使用cachingDNS服务器的可能性,它似乎有点麻烦打扰。
如果您遇到问题并且未运行nscd,请选中重置DNS recusive查找链中的下一步。
一个小警告,如果你需要刷新一个DNScaching,在你的最终机器上刷新它可能无法按预期工作。 通常,您的最终机器上的DNScaching是从最近的DNS服务器获取的,通常位于主路由器/ DHCP服务器上。
这对大多数人来说并不明显,但是这也许可以解释为什么当你尝试执行前面提到的linux DNScaching刷新时,你会发现nscd没有运行。 (我还没有看到一个默认运行这个设置很长一段时间的设置)。
你需要检查你的networkingDNS服务器/路由器/防火墙/调制解调器手册/用户界面的工作原理。 通常重新启动他们的伎俩,但要警告,我已经看到盒子,重新启动时记住DNScaching。
即便如此,当你完成了上述所有的工作之后,当你第一次把你的networking看到离你最近的跳线(通常是你的ISP)的时候,你可以直接进入,并且用一个虚假的条目来污染你的DNScaching。有一个陈旧的DNScaching。