Amit Bhawani Blog

Stay Updated!

Powered by Genesis

You are here: Home / How to Guide / How to flush DNS in Windows Mac Linux?

How to flush DNS in Windows Mac Linux?

September 9, 2008 by Amit Bhawani

There may be a number of reasons that you may want to flush the DNS in your computer system. Generally though, DNS is flushed in order to get a new name resolution. At other times you may have registered a new domain name and may be unable to access. Even in this case you may need to flush your DNS. You also just simply flush your DNS in order to get a new entry anytime.

Flushing the DNS can have many benefits. For one thing it definitely speeds up the name resolution especially if multiple lookups are conducted on the same address. This is a common practice while browsing the internet.

At other times you may have a bad DNS entry cached up which will require you to flush it in order to get rid of it. Either that or you can simply wait for a period of twenty four hours after which the cache will be automatically dropped.

The benefits and circumstances when you may need to flush DNS entries are clear. The real question is how do you flush DNS? Well we’ve got the answers right here for you.

How to flush the DNS cache in Linux:
1. Start off by restarting the nscd daemon
2. For this you will have to type in /etc/rc.d/init.d/nscd restart in the terminal of your computer
3. Then all you have to do is run command and your Linux DNS cache will automatically flush.

How to flush DNS cache in Microsoft Windows (Win XP, Win ME, Win 2000)
1. Start and enter the run command where you will have to type cmd
2. In the command prompt you will have to type ipconfig /flushdns
3. That’s about it because your Window DNS cache has already been flushed.

How to flush the DNS cache in Mac OS X Leopard:
1. The first step is to type lookupd-flushcache in the terminal in order to flush the DNS resolver cache.
2. ex: bash-2.05a$ lookupd –flushcache
3. Your DNS cache will be flushed once you run command.

How to flush the DNS cache in Mac OS X:
1. The first step to flushing your cache in Mac OS X is to type dscacheutil -flushcache in your terminal.
2. ex: bash-2.05a$ dscacheutil –flushcache
3. Your DNS cache will flush once you run command

For Microsoft Windows you can just use the command ipconfig /flushdns in order to flush DNS resolver cache – C:\>ipconfig /flushdn. This will be enough to successfully flush the cache. If you wish to view the DNS cache you can use the command ipconfig /displaydns.

In some cases you may experience problems with DNS caching with Microsoft Windows. In order to resolve this problem you can disable client side DNS Caching. The two commands you can use for this are:
net stop dnscache
sc servername stop dnscache

In this way you can disable the DNS caching until you reboot your computer for the next time. You can even make the change permanent if you want.

Share this:

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)

Related

About

My name is Amit Bhawani and here I like to share my internet/tech experience with my online readers. You can follow me on Twitter, Facebook & Instagram at @AmitBhawani I am also the Editor-in-Chief of PhoneRadar & Master Gadgets

About Amit Bhawani

My name is Amit Bhawani and here I like to share my internet/tech experience with my online readers. You can follow me on Twitter, Facebook & Instagram at @AmitBhawani

Comments

  1. Flush DNS says

    September 19, 2009 at 12:02 am

    On newer versions of Windows you need to make sure that you run the command prompt in admin mode otherwise it will not work

Timeline

Check out Just EV Tweets by @amitbhawani

Recommended To Read

  • How to Find your WiFi Signal Strength & Dead spots in your Home – Best Apps
  • The Wuhan Corona Virus Effect in India – How to Stay Safe
  • This Blogger Lost 25Kgs with this Secret Strategy that Includes a Fitness Tracker
  • Making Money on YouTube, MCN, Useful Tools, Tips & Success Stories
  • The #JaguarPerformance Experience that was Mind Blowing