Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How to unset DNS servers with networksetup command?

Hi.


I set DNS server setting at terminal with networksetup command.


shell> sudo networksetup -setdnsservers "Wi-Fi" 127.0.0.1


How to unset DNS servers with networksetup command?


Such as...


shell> sudo networksetup -setdnsservers "Wi-Fi" // not working!

I want to switch quickly and easily when connect to DNS overriding free wi-fi spots.


Thanks.

MacBook Pro (Retina, 13-inch, Mid 2014), OS X Yosemite (10.10.5)

Posted on Dec 12, 2015 2:59 AM

Reply
Question marked as Best reply

Posted on Mar 29, 2017 2:41 PM

Do the following:

networksetup -setdnsservers Wi-Fi "Empty"

1 reply

How to unset DNS servers with networksetup command?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.