Apple Event: May 7th at 7 am PT

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.