28 October 2009

How to Flush DNS in Linux

In Linux, the nscd daemon manages the DNS cache. So if we want to flush the DNS cache, we do it via that nscd daemon.

To flush the DNS cache, restart the nscd daemon.

To restart the nscd daemon, use the command 
/etc/init.d/nscd restart

To restart the nscd daemon, we can also use the command

service nscd restart