Systemd-resolved is a DNS resolver and caching service that comes pre-installed on newer versions of Linux . To flush the DNS cache in systemd-resolved, follow these steps:
- Open a terminal window.
- Run the following command:
sudo systemd-resolve --flush-caches
- To verify that the cache has been cleared, you can check the cache statistics using the following command:
sudo systemd-resolve --statistics
Under “Cache”, you should see “Current Cache Size” set to 0.
Flushing DNS Cache in dnsmasq
Dnsmasq is a lightweight DNS and DHCP server often used in home networks and Linux distributions. To flush the DNS cache in dnsmasq, follow these steps:
- Open a terminal window.
- Restart the dnsmasq service using the following command:
sudo systemctl restart dnsmasq
By restarting the service, you effectively clear the DNS cache.
Flushing DNS Cache in BIND (named)
BIND is a popular DNS server software used by many organizations worldwide. If your system uses BIND as a caching DNS resolver, you can clear its cache with these steps:
- Open a terminal window.
- Run the following command to flush the DNS cache:
sudo rndc flush
This command will clear the entire DNS cache in BIND.
Clearing DNS Cache in Web Browsers
Web browsers like Google Chrome and Mozilla Firefox also maintain their DNS caches to speed up web browsing. To clear the DNS cache in your browser, follow the instructions specific to your browser:
- Google Chrome: Navigate to “chrome://net-internals/#dns” and click the “Clear host cache” button.
- Mozilla Firefox: Type “about:networking#dns” in the address bar, then click the “Clear DNS Cache” button.
Original Post Owner:
Comentarios
Publicar un comentario