banner
李大仁博客

李大仁博客

天地虽大,但有一念向善,心存良知,虽凡夫俗子,皆可为圣贤。

Force clear the local DNS cache of the system.

When the local DNS cache is contaminated by GFW, it is necessary to manually force clear the local DNS cache. Usually, fixing the network connection is sufficient. It is also simple to handle it using command line. Below are the methods to force clear the local DNS cache in Windows/Mac OS/Linux/Unix environments.

  1. In Windows environment, you can use the following command:

ipconfig /flushdns

  1. In Mac OS X environment, usually you can use the following command:

sudo dscacheutil -flushcache

  1. In Linux/Unix environment, depending on the system's DNS cache mechanism, if the system uses NSCD for DNS cache, you can use the following command:

sudo /etc/init.d/nscd restart

If the server or router uses DNSMASQ, you can use the following command:

sudo dnsmasq restart

Finally, for Android and iOS, you can refer to the above commands to solve the issue, but the following method is sufficient for clearing the cache:

Enable airplane mode -> Modify DNS -> Disable DNS

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.