Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Linux 系統教學 >> Linux 教學

Linux/Windows/Mac 三大平台刷新 DNS 快取指令大全

編輯:Linux 教學

Windows

# XP/2000/ME/98
ipconfig /flushdns

# Vista/7/8/10/11 (需以管理員身分執行 cmd)
ipconfig /flushdns
# 顯示 "已成功刷新 DNS 解析緩存"

Linux

# 傳統 init 系統
/etc/rc.d/init.d/nscd restart
# 或
/etc/init.d/nscd restart

# systemd 系統
systemctl restart nscd
# 或重啟 systemd-resolved
systemctl restart systemd-resolved

Mac OS X

# 舊版本
lookupd -flushcache

# 新版本 (macOS 10.10+)
dscacheutil -flushcache
# 或
sudo killall -HUP mDNSResponder

網路環境惡劣導致域名 A 記錄變更本地未生效時,手動刷新 DNS 快取可立即解析新 IP。

Copyright © Windows教程網 All Rights Reserved