How to Flush DNS in Different OS’es?
Most DNS clients cache the results of name resolution requests. This speeds up name resolution if multiple lookups are done to the same address, such as is common when browsing the web. Sometimes a bad DNS entry will be cached and you will need to either flush the DNS cache to get rid of it, or wait up to 24 hours for it to be dropped from the cache automatically.
- How to Flush DNS in Microsoft Windows
- How to Flush DNS in Mac OSX
- How to Flush DNS in Linux
In Microsoft Windows, you can use the command ipconfig /flushdns to flush the DNS resolver cache. You can also use the command ipconfig /displaydns to view the DNS resolver cache. You Get something like this when you execute this command.
C:\>ipconfig /flushdns
Windows IP Configuration
Successfully flushed the DNS Resolver Cache.
In Mac OSX, you can use the command lookupd -flushcache to flush the DNS resolver cache.
bash-2.05a$ lookupd -flushcache
In Linux, the nscd daemon manages the DNS cache. To flush the DNS cache, restart the nscd daemon.
To restart the nscd daemon, use the command `/etc/rc.d/init.d/nscd restart`.




2 Comments, Comment or Ping
yukon
Tried lookupd -flushdns on Leopard (10.5) using terminal and got the message “command not found”
Any ideas?
Oct 30th, 2007
yukon
Just thought you should know, this is how you flush DNS in OS X Leopard:
dscacheutil -flushcache
lookupd has been replaced with dscacheutil
Oct 31st, 2007
Reply to “How to Flush DNS in Different OS’es?”