[macOS/Linux/Windows] How to flush DNS cache

[macOS/Linux/Windows] How to flush DNS cache

macOS

1
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

Windows

Open cmd (administrator), then

1
ipconfig /flushdns

Ubuntu Linux

  • For Ubuntu 17.04 and higher (18.04)

    1
    sudo systemd-resolve --flush-caches
  • For Ubuntu 22.04 and higher

    1
    sudo resolvectl flush-caches

[macOS/Linux/Windows] How to flush DNS cache
https://www.billhu.us/2024/47_flush_dns_cache/
Author
Bill Hu
Posted on
June 19, 2024
Licensed under