How to clear DNS system cache in Linux / Windows / Mac

DNS (Domain Name System) is a resolution mechanism to translate, resolve and return real IP address of the serving machine against the fully qualified domain name of the URL (Uniform Resource Locator).

Whenever a domain has been resolved, the DNS resolution is stored and cached locally for future use. The caching of DNS on local system ensure the fastest speed to resolve any domain name, and reducing hits, and directly load and burn of DNS name servers. However, it may cause some issues such as some website and web pages not loading or cannot be contacted and connected when browsing, causing by changing of IP address or nameservers that hasn’t been reflected and refreshed on local copy. The symptom is more obvious when user set web browser to use proxy to surf the Internet, and these sites now can be loaded properly.

When encountering any inaccessible or unable to load web page issue, one possible resolution is to try to flush (empty and reset) the DNS cache on the system.

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.

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.

  -  /etc/rc.d/init.d/nscd stop
  -  /etc/rc.d/init.d/nscd start

- 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.

- 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.

- Once you run the command your DNS cache (in Mac OS X Leopard) will flush.

To flush the DNS cache in Ubuntu

- sudo apt-get install nscd

- sudo service nscd restart

Clear local DNS cache for current user
nscd -i hosts

Clear local DNS cache for all users
nscd -I hosts

Flush caching BIND server dns cache

A caching BIND server obtains information from another server (a Zone Master) in response to a host query and then saves (caches) the data locally. All you have to do is restart bind to clear its cache

# /etc/init.d/named restart

Terima kasih telah membaca artikel tentang How to clear DNS system cache in Linux / Windows / Mac di blog Tutorial Opensource and Linux jika anda ingin menyebar luaskan artikel ini di mohon untuk mencantumkan link sebagai Sumbernya, dan bila artikel ini bermanfaat silakan bookmark halaman ini di web browser anda, dengan cara menekan Ctrl + D pada tombol keyboard anda.

Artikel terbaru :

  • How To Install Cinnamon In Ubuntu 14.04
  • How To Install Mate Desktop In Ubuntu 14.04
  • Creating the first Windows Server 2003 Domain Controller in a domain
  • How To Install Ubuntu 13.10 Server
  • How to Install Nuvola Player in Ubuntu
  • How to establish Emerald in Ubuntu 13.10 & Linux Mint 16
  • How to Restoring iptables Automatically On Boot on Debian and Ubuntu
  • How to Compile FFMPEG with H.264 and LAME in Ubuntu And Debian
  • How to Install Linux on a Playstation 2
  • apt-fast: Improve apt-get Download Speed
  • Artikel terkait :