Friday, March 29, 2024

如何刷新计算机本地DNS缓存

本文讲解如何刷新Windows、Mac OS X、Linux操作系统的本地DNS缓存。

Windows操作系统

进入命令提示符下(开始—运行—cmd),输入:

ipconfig /flushdns

或者直接禁用网卡后再启用网卡,也可以刷新本地DNS缓存。

Mac OS X操作系统

In Mac OS X Leopard, you can use the command
dscacheutil to flush the DNS resolver cache:

dscacheutil -flushcache

In Mac OS X versions 10.5.1 and before, the command lookupd -flushcache performed the same task:

lookupd -flushcache

Linux操作系统

在Linux中,nscd daemon管理DNS缓存。如果想刷新DNS缓存,需要重新启动nscd daemon。

重启nscd daemon的命令如下:

/etc/init.d/nscd restart

2 comments

  1. 欢迎来访。

  2. flushdns倒是经常用,禁用启用网卡第一次听说,又学了一招

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.