How to Flush DNS Cache on MacBook: Terminal Command

๐Ÿ‘64views

Flushing DNS cache on a MacBook requires opening Terminal and running `sudo dscacheutil flushcache; sudo killall HUP mDNSResponder`. Enter your administrator password when prompted. This command works on macOS Monterey, Ventura, and Sonoma. Older macOS versions may use slightly different commands, but this two part command covers most modern Mac systems.

How to Flush DNS Cache on MacBook: Terminal CommandAndrew Baker's Technology Blog Posts, 01/Sep/2022
https://andrewbaker.ninja/2022/09/01/how-to-flush-dns-cache-on-macbook-terminal-command/

Article Summary
  • 1.
    What it is
    This article provides a terminal command to clear DNS cache on Mac computers using a sudo command in Terminal.
  • 2.
    Why it matters
    Flushing DNS cache can resolve website loading issues, connection problems, or force your system to fetch fresh DNS records when network configurations change.
  • 3.
    Key takeaway
    Use Terminal with a sudo command to quickly flush DNS cache on Mac when experiencing network connectivity issues.
40 words ยท ~1 min read

I am not going to tell you why you would need to flush your DNS cache (you will know if you need to). So, to flush DNS on a mac simply fire up Terminal and run the following sudo command:

sudo dscacheutil -flushcache
sudo killall -HUP mDNSResponder

Leave a comment

Your email address will not be published. Your first comment is held for approval.