Toggle Bluetooth Power with blueutil
Turn Bluetooth on or off from the macOS command line using blueutil.
blueutil --power toggle
01Command
Command
$ blueutil --power toggle02What it does
blueutil is a CLI for Bluetooth on macOS. The --power option sets the Bluetooth power state, and the special value `toggle` flips it — handy for scripting or switching off Bluetooth without opening System Settings. Install it with `brew install blueutil`. You can check the current state with `blueutil --power`, which prints 1 (on) or 0 (off).
03Risk
!Warning: blueutil refuses to run as root by default; if needed, use `sudo BLUEUTIL_ALLOW_ROOT=1 blueutil …`. Opening the Bluetooth preference pane may also change discoverability in ways blueutil does not report.
04Undo
Undo
$ blueutil --power toggle05Sources
- GitHub - toy/blueutil: CLI for bluetooth on OSX: power, discoverable state, list, inquire devices, connect, info, … · GitHubEvidence: -p, --power STATE set power state ... STATE can be one of: 1, on, 0, off, toggle ... CLI for bluetooth on OSX: power, discoverable state, list, inquire devices, connect, info, …
Last verified: 2026-09-21 · Category: System & Settings
06Related solutions
Change where screenshots are saved on Mac
Point macOS screen captures at any folder you choose instead of the desktop.
Download a file from a URL on Mac with curl
Grab any file from the web straight into the current folder — no browser needed.
Find files larger than 500 MB on Mac
List the biggest files in your home folder that are eating disk space.