How to Flush DNS Cache in Windows, GNU/Linux, Solaris 10 UNIX & MAC OS X:

Originally I was just going to post up the MAC OS X versions 10.4 and 10.5 ways
to flush the dns cache, since i rarely use Macs, I usually forget them dns commands
for the mac os x. But i thought it may come in handy to other people that check this page and have the other systems dns cache flush commands as well. All such commands to be issued at command line.

in Microsoft Windows XP:

ipconfig /flushdns

in GNU/Linux:

For desktop systems that use nscd, you can restart the nscd daemon to flush the dns cache in Linux, depending on different Distribution systems the path to the nscd file could differ, so just locate the nscd path and then restart it, some common paths are in these commands below:

service nscd restart or /sbin/service nscd restart or /etc/init.d/nscd restart

Theres also the dnsmasq dns cache for linux, then use command below instead:

/etc/init.d/dnsmasq restart

And BIND server dns cache use the command below instead:

/etc/init.d/named restart

(*Obviously one must have root or sudo priviledges to issue such commands)

in Solaris 10 UNIX:

for SOLARIS one must locate the nscd then issue a kill command with the
NSCD daemon’s PID, example:

pkill <PID> or kill <PID> and restart the nscd daemon again with: /usr/sbin/nscd

to check for the nscd process issue this command: ps -ef | grep nscd

(*must have root priviledges)

in Mac OS X:

for 10.5 Leopard use: dscacheutil -flushcache

for 10.4 Tiger use: lookupd -flushcache