I'm trying to find out how to turn Bluetooth On or Off by using the Terminal on macOS Catalina.

I used to be able to do it with the following commands:

alias bton="sudo defaults write /Library/Preferences/com.apple.Bluetooth ControllerPowerState -int 1"
alias btoff="sudo defaults write /Library/Preferences/com.apple.Bluetooth ControllerPowerState -int 0 && \sudo killall -HUP blued"

Unfortunately these no longer work.


1 Answer 1


Blueutil, a command-line utility for macOS that lets us turn Bluetooth on and off with one command!

Start by installing blueutil with HomeBrew:

brew install blueutil

The -p flag is a switch for turning Bluetooth on and off:

Turn bluetooth off

blueutil -p 0

Turn bluetooth on

blueutil -p 1
  • 1
    This is also the accepted answer on the potential duplicate.
    – anki
    Jan 8, 2020 at 15:40
  • 2
    is there no method of doing this without having to install a 3rd party app?
    – esaruoho
    Jan 9, 2020 at 15:29

Not the answer you're looking for? Browse other questions tagged .