Apple Intelligence is now available on iPhone, iPad, and Mac!

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

Disable bluetooth through terminal?

I manage a couple of labs through ARD, and I would like to know if it is possible to turn off bluetooth using terminal. I can turn off airport, but I've been searching for such a command with no luck.

Bonus, is there also a way to turn remove the bluetooth icon from the menu bar using terminal?

MacBook Pro, Mac OS X (10.6.4), Managing 700 Apple devices

Posted on Oct 19, 2010 12:00 PM

Reply
Question marked as Top-ranking reply

Posted on Apr 19, 2017 3:39 AM

Above commands worked for me.

And finally relaunching Finder fixed the issue.


I even tried disabling and enabling Airdrop , as suggested by some one in similar post.

Which did not work for me.

11 replies

Oct 29, 2010 1:42 PM in response to TR_Chris

It's a network service, not an interface.

"networksetup -listallnetworkservices" should give you it's name (probably something like "Bluetooth DUN"). Similarly, I imagine disabling it would be done via one of the service-related commands, not the interface-related commands.

networksetup is the backend to the Network Preference Pane...since you can make a service inactive via the GUI, there must be an equivalent command in networksetup.

Jan 15, 2011 3:49 PM in response to TR_Chris

probably due to a faulty bluetooth-device i just had to do this in singe-user/safe mode (cmd-s during boot) to circumvent a kernel-panic:
+defaults write "$(find /Library/Preferences -iname ' bluetooth'|sed -Ene's/\.plist//p')" ControllerPowerState -int 0+
but feel free to use this one ;p :
*defaults write /Library/Preferences/com.apple.Bluetooth ControllerPowerState -int 0*

cheers
vike

Jun 14, 2013 10:35 PM in response to TR_Chris

I've been looking into this myself, here's some more commands to add to the list:



defaults read /Library/Preferences/com.apple.Bluetooth.plist ControllerPowerState

#read the current pref, returns '0' for off and '1' for on.


--

All of the following will require sudo if run from the command line:


defaults write /Library/Preferences/com.apple.Bluetooth.plist ControllerPowerState 0

#set bluetooth pref to off



defaults write /Library/Preferences/com.apple.Bluetooth.plist ControllerPowerState 1

#set bluetooth pref to on




killall blued

#kill the bluetooth server process



launchctl unload /System/Library/LaunchDaemons/com.apple.blued.plist

#unload the daemon




launchctl load /System/Library/LaunchDaemons/com.apple.blued.plist

#reload the daemon



launchctl start com.apple.blued

#restart blued daemon

Disable bluetooth through terminal?

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