Flush nscd DNS cache

Flush nscd DNS cache

name service cache daemon (nscd) cache is persistent by default on CentOS 7, to flush it, you need to run:

nscd -i hosts

-i stands for invalidate.


You can also check if nscd‘s cache is persistent by running

nscd -g
image 81 - Flush nscd DNS cache

nscd caches several other types of data (not just DNS entries), so if you’re looking for the DNS cache specifically, make sure to look under the hosts cache section:

image 82 - Flush nscd DNS cache
whoami
Stefan Pejcic
Join the discussion

I enjoy constructive responses and professional comments to my posts, and invite anyone to comment or link to my site.