How to flush DNS cache in Linux / Windows / Mac

Flush dns to get a new name resolution. Also flush dns cache when you can’t access a newly registered domain name. You can simply flush your dns cache anytime to get new entry. So, Flush your dns cache now.

To flush DNS cache in Microsoft Windows (Win XP, Win ME, Win 2000):-

- Start -> Run -> type cmd
- in command prompt, type ipconfig /flushdns
- Done! You Window DNS cache has just been flush.

To flush the DNS cache in Linux, restart the nscd daemon:-


- To restart the nscd daemon, type /etc/rc.d/init.d/nscd restart in your terminal
- Once you run the command your linux DNS cache will flush.

To flush the DNS cache in Mac OS X Leopard:-

- type lookupd -flushcache in your terminal to flush the DNS resolver cache.
ex: bash-2.05a$ lookupd -flushcache
- Once you run the command your DNS cache (in Mac OS X) will flush.

To flush the DNS cache in Mac OS X:-

- type dscacheutil -flushcache in your terminal to flush the DNS resolver cache.
ex: bash-2.05a$ dscacheutil -flushcache
- Once you run the command your DNS cache (in Mac OS X Leopard) will flush.

Technorati Tags: , , , , , , , , , , , , , ,

Do you want a dedicated hosting server  that won’t let you down? Sign online today and learn all about dedicated servers. If you want to host a website,  you need a host that won’t let you down.  You need a dedicated server that will maintain power through high traffic. Do your research on exchange server hosting!

Share and Enjoy:
  • Reddit
  • BlinkList
  • del.icio.us
  • Digg
  • Fark
  • IndianPad
  • StumbleUpon
  • YahooMyWeb


Posted at September 28th, 2006 by chua

If you think this article helps you to solve your problem and clear your headache, feel free to buy me a drink :)


Related Post

18 Responses to “How to flush DNS cache in Linux / Windows / Mac”

  1. Benjamin Schmidt Says:

    On my Debian machine, the nscd daemon is not installed by default. (/etc/rc.d/init.d/nscd missing)

    Description:
    A daemon which handles passwd, group and host lookups
    for running programs and caches the results for the next
    query. You should install this package only if you use
    slow Services like LDAP, NIS or NIS+

    So i think “/etc/init.d/network restart” does also clear the cache. Does anyone know a better solution, let me know

  2. acklan Says:

    ipconfig /flushDNS dos not work with Windows 9x\ME

  3. Cómo hacer un ‘flush cache’ en Windows, Mac y Linux Says:

    [...] | DosBit - Techie Corner Publicaciones [...]

  4. gabriel Says:

    this does NOT flush firefox internal cache.

  5. sogua Says:

    gabriel: this only flush ur pc dns cache. if you wan to clear Firefox internal cache, you can open firefox -> Tools -> Clear Private Data (Check the cache) and click “Clear Private Data Now”

  6. wululululu Says:

    i think gabriel means the internal firefox dns cache (yes firefox has it’s own dns cache… unnecessarily)
    but i don’t know how to flush it… the only thing i can change, is the expiration interval.

  7. SoGua Says:

    Normally the internal firefox cache will be clear once you close all the browser.

  8. Sam Says:

    firefox’s about:config has an option: network.dnsCacheEntries
    setting this to 0 will disable the cache and fallback to the local DNS cache.

  9. Mohan.R Says:

    Hello Sir………..

    To whom ever it may concern……………
    Can you give me a solution for this………
    Here we are using Terminal server with more than 50 clients at a time……..
    but when i shutdown and restart that server then it will shows some errors
    “IEXPLORER has encounter a problem”…………. Please can you give me a solution for this…………….. And we are using Domain environment also. Please give a solution for this……

  10. Dad Says:

    Can someone help…! I can’t Clear my Cache…

    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.

    C:\Documents and Settings\Dad>ipconfig /flushdns

    Windows IP Configuration

    Could not flush the DNS Resolver Cache: Function failed during execution.

    C:\Documents and Settings\Dad>

  11. Jason Says:

    Sam, which version of firefox has that option?
    I cannot locate it in my about:config

  12. kyle Says:

    Hey dad.. try this.

    1. Click the Microsoft Vista Start logo in the bottom left corner of the screen
    2. Click All Programs
    3. Click Accessories
    4. RIGHT-click on Command Prompt
    5. Select Run As Administrator
    6. In the command window type the following and then hit enter: ipconfig /flushdns
    7. You will see the following confirmation:

    Windows IP Configuration
    Successfully flushed the DNS Resolver Cache.

  13. Increase Search Engine Ranking Says:

    /etc/init.d/network restart

    Will clear the cache on Linux.

  14. sli Says:

    in MacOSX Leopard 10.5.2 its :

    dscacheutil -flushcache

  15. Ryan Says:

    bash-2.05a$ lookupd -flushcache

    When I try this on my Mac I get a command not found?

    ryan-imac:~ ryan$ bash-2.05a$ lookupd -flushcache
    -bash: bash-2.05a$: command not found
    ryan-imac:~ ryan$

  16. flush DNS on Linux - NOVELL FORUMS Says:

    [...] rnrn rn rn rn Re: flush DNS on Linuxrn rn rn rn rn rn Does this help?rnrnHow to flush DNS cache in Linux / Windows / Mac - Techie Cornerrn rn rn rn rn rnrn rn rn rn __________________rn Marcel Coxrn rn rn [...]

  17. Mothership Says:

    Ryan,

    that’s because the headings for the two Mac OS X commands are around the wrong way.

    If you’re using 10.5, use: dscacheutil -flushcache

    Also, you want everything after the $ sign. The rest is what is written before the command prompt.

  18. sweet bunny Says:

    I can’t flush my dns cache in win98.

    ipconfig/flushdns is a bad command

    I am unable to get to certain websites on both ie and firefox

    I was able to get to the sites at one time, but once I get the server not found message i can’t get to the site.

    Thanks for any help

Leave a Reply