How to Quickly Flush DNS on Windows & Linux

September 14, 2023 / Domain and DNS

In this guide, we will explain how to flush DNS Cache on Linux and Windows.

  1. Follow these steps to clear the DNS cache in Linux:
    1. Open your “terminal”.
    2. Execute the following command.
      sudo systemd-resolve --flush-caches
    3. Next, the Terminal will ask for your password. Enter your password to complete the command execution and clear your DNS cache.Note: If you’re using a Linux distribution other than Ubuntu, you can clear your DNS cache by running this command:
      sudo /etc/init.d/dns-clean start
    4. Once you execute this command, you should see that your cache has been successfully cleared.
  2. Now, let us check how to clear the DNS Cache on Windows:
    1.  Click on the “Start” button.
    2. Navigate to Windows Systems > Command Prompt
    3. Enter the following command line.
      ipconfig /flushdns

      clear DNS cache

    4. Executing this command will provide a confirmation indicating the successful flushing of the DNS cache.

In this way, you can flush DNS Cache on Linux and Windows.

If you are using macOS and want to clear Local DNS cache from it then check out our guide on How to Clear the Local DNS Cache on macOS

If you need any assistance do contact our support staff at your earliest.

Troubleshooting DNS issues and network connectivity?
A Linux VPS Hosting solution provides full root access and the flexibility needed to manage DNS settings, network services and server configurations.
Spread the love