Skip to content

Instantly share code, notes, and snippets.

@einyx
Last active August 29, 2015 14:20
Show Gist options
  • Save einyx/573d53a6d087df6a40b2 to your computer and use it in GitHub Desktop.
Save einyx/573d53a6d087df6a40b2 to your computer and use it in GitHub Desktop.
force bluetooth restart on mac
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment