Linux /Winodows/Mac: How To Refresh DNS Cache

When you try to view a domain name or a website, Maybe you are not able to view the site, or the browser will give you a warning message that domain name can not resolve. how we do when encountering this problem? There is a better way to refresh DNS cache so that system can get the latest domain resolved information , especially,  In respect to the new registered domain name. In this post, you’ll see the ways of refreshing DNS cache for different operating system: CentOS Linux,  Mac OS X, Windows.

​CentOS Linux Refreshing DNS Cache

You need to restart nscd service to refresh dns cache under CentOS Linux system, type the following command:

$sudo /etc/init.d/nscd restart

or

$ service nscd restart

Then you local DNS cache should be refreshed and get the latest DNS resolved information.

Mac OS X  Refreshing DNS Cache

For Apple’s Mac OS X system, you need to run the below command in command line interface, type:

lookupd -flushcache

or

dscacheutil -flushcache

Windows Refreshing DNS Cache

Open MS-Dos  Window, and run “ipconfig /flushdns” command.

C:\>ipconfig /flushdns

Windows IP Configuration

Successfully flushed the DNS Resolver Cache.

done….

You might also like:

Sidebar



back to top