2 September 2010

Flush DNS Cache on MAC OS X

Mac OS X – Clearing or flushing the DNS Cache

Once you go to a Web site, or do any DNS lookup, the IP gets cached for quite a while. This becomes a royal pain if you’re a systems administrator who is in the middle of migrating domains from one server to another. Executing the following clears the cache, restarts the caching daemon, and fetches fresh DNS records. And there was much rejoicing…

For Leopard


sudo dscacheutil -flushcache

For Tiger

lookupd -flushcache

(On Windows you do ipconfig /flushdns)

Please rate this post:

1 Star - It\\\'s Crud2 Stars - It\\\'s Tosh3 Stars - Something\\\'s missing4 Stars - Needs works5 Stars - Good Enough6 Stars - Good7 Stars - Excellent8 Stars - Brilliant9 Stars - Astonishing10 Stars - Awesomely Godlike? (2 votes, average: 8.00 out of 10)
Loading ... Loading ...

About Greg Ferro
Greg is a Network and Security Architect / Designer / Engineer working freelance in the UK and worked for Resellers, DotCom's, Large Corporate's and Service Providers across a variety of products & Vendors. He prefers to work for end users, believes in the life cycle, total cost of ownership and that near enough is often good enough. He likes talking about himself in the first person to feel "royal", even when hosting the Packet Pushers Podcast on Data Networking. More about Greg at http://etherealmind.com/who-am-i/ and you can follow him on Twitter.

Comments

  1. takizo says:

    Thanks dude. Was looking how to flush DNS on my snow leopard, it’s the same command as Leopard.

  2. Adam says:

    When I attempt to perform this (snow leopard) I get the following:

    “Improper use of the sudo command could lead to data loss
    or the deletion of important system files. Please double-check your
    typing when using sudo. Type “man sudo” for more information.

    To proceed, enter your password, or type Ctrl-C to abort.”

    What password is it asking for just the system administrator? I entered that and it said that it was incorrect.

    Thanks

Speak Your Mind

*