The Geek Factory

Your one-stop IT shop for all your PC, Web, Graphic Design and Internet Needs.

To flush the DNS cache, you can use the following commands depending on your operating system:

Windows:

  1. Open the Command Prompt as an administrator.
  2. Type the following command and press Enter:
    bash
    ipconfig /flushdns

macOS:

The command may vary slightly depending on the macOS version:

  • macOS Big Sur and later:
    sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
  • macOS Catalina:
    sudo killall -HUP mDNSResponder
  • macOS Mojave and High Sierra:
    sudo killall -HUP mDNSResponder
  • Older versions (e.g., macOS Yosemite):
    sudo discoveryutil udnsflushcaches

Make sure to enter your password when prompted.

Linux:

  • Systemd-based systems (e.g., Ubuntu, Fedora):
    arduino
    sudo systemd-resolve --flush-caches
  • Using nscd (Name Service Cache Daemon):
    bash
    sudo /etc/init.d/nscd restart
  • Using dnsmasq:
    bash
    sudo /etc/init.d/dnsmasq restart

Make sure to use the appropriate command for your specific setup!

Leave a Reply

Your email address will not be published. Required fields are marked *