Howto clear/Flush DNS Cache in Ubuntu

Topics Linux on January 14th, 2008

Some distributions run a caching nameserver in the background out of the box while some do not. To clear the cache if you have such a daemon running, simply restart the nscd service in .

Most clients will cache the results of name resolution request to speed up multiple lookups to the same URL. Just think about how many requests are made to the same domain when visiting a single web page. Every file, image, style sheet, etc. that is on that page and served from the same domain requires a lookup.

So if you have an invalid entry cached on your local client you’ll need to it out of the cache so your client can do a new lookup and get the correct information. Or your other option is to wait until that entry expires and the cache flushes it automatically… which typically takes about 24 hours.

In if you want to cache you need to restart nscd daemon

using the following command

sudo aptitude

Cache in Using the following command

sudo /etc/init.d/nscd restart

Share and Enjoy:
  • del.icio.us
  • StumbleUpon
  • Facebook
  • Google
  • Furl
  • Live
  • MisterWong.DE
  • NewsVine
  • Reddit
  • Slashdot
  • Technorati
  • YahooMyWeb
  • BlinkList
  • description
  • Fark
  • Netvouz
  • Spurl
  • MisterWong
  • Webnews.de
  • E-mail this story to a friend!
  • Print this article!

Tags:, , , ,

Related posts

No Responses to “Howto clear/Flush DNS Cache in Ubuntu”

  1. 1
    MS Windows Vista Compatible Software Says:

    speed up multiple lookups to the same URL. Just think about how many requests are made to the same domain when visiting a single web page. Every file, image, style sheet, etc. that is on that page and served from the same domain requires a DNS lookup.(more…)

Leave a Reply