How do I refresh DNS cache in Linux?
Michael Henderson
Published Mar 21, 2026
How do I refresh DNS cache in Linux?
Launch Terminal (ctrl + alt + T), and type “sudo /etc/init. d/dns-clean restart“. This will clear your DNS cache in Ubuntu, and if the problems you were experiencing were due to DNS issues, they should now be gone.
How do I see DNS cache on Linux?
How to inspect the DNS cache on Windows, Mac OS X, and Linux
- In Windows, you can inspect the content of such file by typing ipconfig /displaydns on a command prompt.
- In Mac OS X, inspecting the DNS cache is a little more tricky than Windows.
- sudo nscd -g.
- ipconfig /flushdns.
How do I refresh my DNS cache?
However, the message at the end varies and may require admin intervention.
- Click the Start button.
- Click All Programs > Accessories.
- Select Command Prompt.
- In the command prompt window, type ipconfig /flushdns.
- Press Enter.
- You should see a message confirming that the DNS Resolver Cache was successfully flushed.
Does Linux cache DNS?
On Linux, there is no OS-level DNS caching unless a caching service such as Systemd-Resolved, DNSMasq, or Nscd is installed and running. The process of clearing the DNS cache is different depending on the Linux distribution and the caching service you’re using.
Does Linux have a DNS cache?
Does Linux cache DNS locally?
4 Answers. On Linux (and probably most Unix), there is no OS-level DNS caching unless nscd is installed and running.
Does rebooting clear DNS cache?
A DNS Server’s cache is cleared at reboot. Other than that you can manually clear the cache at any time by using the DNS Admin console.
Does Ubuntu cache DNS?
Ubuntu 18.04 LTS uses a local DNS server and caches DNS queries by default. Ubuntu 18.04 LTS uses systemd for this purpose. As you can see, information about DNS cache is listed in the marked section of the screenshot below. You can also restart the systemd-resolved service to flush the DNS caches on Ubuntu 18.04 LTS.
How do I enable DNS cache in Ubuntu?
Update /etc/resolv.conf
- Open Network Manager (System->Preferences->Network Manager)
- Find your connection and edit it (wired or wireless)
- Toggle “IPV4 configuration” tab.
- On “DNS Servers” field write 127.0.0.1.
How do I clear DNS cache in Chrome?
For Chrome, open a new tab and enter chrome://net-internals/#dns in the address bar and press Enter . Click on Clear host cache button to clear the browser’s DNS cache. No prompts or confirmation messages will be shown, but this simple action should flush Chrome’s DNS cache for you.
How Flush DNS debian 10?
Try another option:
- Open the terminal (usually — «Ctrl+Alt+T»), but you can launch from the dashboard too.
- In the terminal, enter: sudo apt install nscd.
- Press Enter.
- Once demanded — enter the admin password.
- Press Enter.
- Wait until the installation is complete.
- Clear the DNS.
- Press Enter.