Linux下刷新DNS缓存(Ubuntu/CentOS)

现在很多Linux发行版都没有内置DNS本地缓存,Linux不像Windows那样可以使用ipconfig /flushdns来刷新,在Linux下无需刷新,因为本身没有缓存;

当然,如果非要缓存刷新,可以安装nscd,然后刷新这个守护进程。

Ubuntu:

apt-get install -y nscd

CentOS:

yum install -y nscd

使用:

service nscd restart

 

参考:

https://www.siteground.com/kb/how_to_clear_the_local_dns_cache_in_linux/

posted @ 2018-11-25 03:44  EasonJim  阅读(49001)  评论(0编辑  收藏  举报