現在很多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/