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/

猜你喜欢

转载自www.cnblogs.com/EasonJim/p/10014517.html
今日推荐