Home > Article > Operation and Maintenance > How to clear DNS cache
This tutorial will explain how to clear DNS cache, including those on Windows, Mac, and Linux computers.
# A faulty or outdated DNS resolver cache will display incorrect information or errors when you visit a website. Due to recent DNS changes, the following scenarios may occur. Therefore, it is important to know how to flush the DNS cache and resolve this issue easily.
How to Clear DNS on Windows
Step 1 - Launch Windows Command Prompt Console
Press Windows R combination key to open the Run dialog box. Type the following command and click the OK button:
CMD
Open Windows Command Prompt to flush DNS cache
This will open the Command Prompt window .
Prepare to refresh DNS using Windows
Step 2 - Clear DNS
Use this command to clear your computer DNS resolver cache:
ipconfig / flushdns
Wait a moment and you will see confirmation that the DNS resolver cache has been flushed.
Successfully Flush DNS on Windows
How to Flush DNS on Linux
Clear DNS Cache or Linux It's a very simple process. The syntax for flushing DNS may vary depending on the operating system you are running.
Ubuntu Linux
Open a terminal and execute the following command:
sudo服务网络管理器重启
Refresh DNS on Ubuntu Linux via Terminal
Other Linux distributions
If you are any other Linux distribution, this command will do the following:
sudo /etc/init.d/nscd restart
Flush DNS on any Linux operating system via Terminal
How to clear DNS on Mac
Clear DNS Cached commands will vary depending on your operating system version.
Mac OS Sierra
To refresh DNS on this version of Apple OS, navigate to Applications > Utilities > Terminal and enter the following command:
sudo killall -HUP mDNSResponder
Refresh DNS on Mac OS x Sierra using Terminal
Mac OS X El Capitan
If The same process will work if you are a user of this operating system. Open Applications > Utilities > Terminal and enter:
sudo killall -HUP mDNSResponder
Use Terminal to Refresh DNS on Mac OS X El Capitan
Mac OS ##Refresh DNS on Mac OS X Yosemite using Terminal
Mac OS Programs > Terminal and execute:
sudo discoveryutil udnsflushcaches
Using Terminal to Refresh DNS on Mac OS X Mavericks
Mac OS X Mountain Lion
Users of this Mac OS version can use this command to go into Applications > Utilities > Terminal and refresh DNS:
sudo killall -HUP mDNSResponder
Use Terminal on Mac Refresh DNS on OS X Mountain Lion
Mac OS
##Use Terminal to Flush DNS on Mac OS X LionMac OS X Snow Leopard
If you are running this version, please Jump to Applications > Utilities > Terminal and enter:
sudo killall -HUP mDNSResponder
Use Terminal to Refresh DNS on Mac OS X Snow Leopard
Mac OS X Leopard and below
您可以通过转到应用程序 > 实用程序 > 终端并输入以下命令清除此操作系统上的DNS解析程序缓存 :
sudo lookupd -flushcache
使用终端在Mac OS X Leopard或更低级别上刷新DNS
注:浏览器缓存也可能是错误显示网页的原因。
The above is the detailed content of How to clear DNS cache. For more information, please follow other related articles on the PHP Chinese website!