Performance Zone is brought to you in partnership with:

Graduated in computer science at the University of Oldenburg, Germany. Develops software for over 20 years now. Likes to program in Java. Wrote and contributed Maven plugins and implemented initially Maven support for IntelliJ IDEA. Ralf is a DZone MVB and is not an employee of DZone and has posted 18 posts at DZone. You can read more from them at their website. View Full User Profile

How to flush DNS cache

02.16.2013
| 2034 views |
  • submit to reddit
Sometimes it's good to know how to flush the DNS cache on your Linux or Windows box. Here is how to do it:

Linux

Restart the nscd daemon. In case it is not installed install it first
 apt-get install nscd  
then type the command
 sudo /etc/init.d/nscd restart  
or
 sudo service nscd restart  
There are a few alternatives to flush the DNS cache under Linux. See this blog posting to get a more complete overview.

Windows

Open a command shell and type
 ipconfig /flushdns  
Published at DZone with permission of Ralf Quebbemann, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)