Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Mac OS X: restart mDNSResponder
Load up Terminal (Applications > Utilities > and type the following.
sudo launchctl unload -w /System/Library/LaunchDaemons/
To turn it back on, just do the opposite:
sudo launchctl load -w /System/Library/LaunchDaemons/
Copy link

kopepasah commented Jan 28, 2013

This worked like a charm.

I've tried sudo killall -INFO mDNSResponder over and over to no avail.

Thanks for the code.

Copy link

martinburger commented Dec 16, 2013

For me sudo killall -HUP mDNSResponder works (

Copy link

pavelbinar commented Mar 15, 2014

Thanks for sudo launchctl load -w /System/Library/LaunchDaemons/

Copy link

slhck commented Aug 25, 2018

➜ sudo launchctl unload -w /System/Library/LaunchDaemons/

/System/Library/LaunchDaemons/ Operation not permitted while System Integrity Protection is engaged

Does not seem to be possible with macOS when SIP is enabled.

Copy link

dushyant-basson commented Mar 24, 2019

@slhck yes, same here, on macOS Mojave.

Copy link

jasonnerothin commented Jul 10, 2019

Takes two reboots, but you can turn off sip, restore dns to sanity and then turn sip back on: Instructions here:

Copy link

pupitmiser commented Feb 10, 2021

sudo killall -STOP mDNSResponder

sudo killall -CONT mDNSResponder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment