65

I accidentally disabled the Bluetooth on Mac OS. I can't enable it because my Bluetooth based keyboard and mouse are now disabled.

I found a USB based keyboard I can use, so how can I enable Bluetooth just using my keyboard?

Is there a command line way or shortcut I can use?

  • 6
    I can just imagine the :facepalm: when you realized what happened. Hope someone has the right answer for you. :) – JMD Jan 7 '10 at 19:47
  • what if my keyboard is also bluetooth ? – john Smith Aug 6 '14 at 10:13
  • @johnSmith in this case I used my other mac to remote desktop / screen share :) and enabled it remotely. – Nik Todorov Nov 25 '17 at 23:21

16 Answers 16

103

Here's a sequence that worked for me (OS X 10.6.7) when I had the same issue.

  1. Press Space to activate Spotlight.

  2. Type "bluetooth", choose the 'Bluetooth File Exchange' application, and press Return.

  3. Bluetooth File Exchange will prompt to enable the bluetooth hardware, press Return.

  4. Bluetooth is now enabled and you can quit Bluetooth File Exchange.

  • This worked better for me, as I have the function keys set to control playback, and Control+F7 wasn't enabling full keyboard access... Thanks! – geerlingguy Jun 22 '11 at 14:31
  • 2
    This worked well for me because the On checkbox in the Bluetooth preferences pane was not selectable :-( OS X Lion – Bennett Dill Feb 1 '12 at 17:18
  • 1
    This worked way better for me than fideli's answer which got me all the way to bluetooth settings but I could not tab to the on check box. This was also lot faster and easier. – JD Isaacks Jan 16 '13 at 15:19
  • 1
    Elegant and functional — this was an awesome answer. – ehfeng Apr 16 '14 at 20:34
  • This really is the best solution that I've found to this problem. Very quick to execute, and easy to remember. – tobylaroni Aug 15 '18 at 12:40
27

I've been using blueutil occasionally - seems to work. It's free and comes with the source code.

blueutil --power 1
blueutil --power 0

Older versions:

Usage:

Print bluetooth status
blueutil status

Switch bluetooth on
blueutil on

Switch bluetooth off
blueutil off

  • 3
    I installed this via brew and the on command was blueutil power 1 – Nick May 21 '15 at 20:56
  • Best answer to this question! – Vishal Aug 8 '18 at 2:24
  • 1
    Sorry if this comment runs counter to (necro) etiquette on this Stack, but I thought it might add something useful... Here's the blueutil-based Bash script I use to toggle Bluetooth on/off: if [[ $(blueutil status) == 'Status: off' ]] ; then blueutil on ; else blueutil off ; fi. If you bind this script to a keyboard shortcut e.g. via Karabiner you get a Bluetooth toggle without resorting to some hacky key event solution. – Bert Zangle Oct 27 '18 at 17:58
  • Thanks! The best and efficient answer. I have installed with "brew install blueutil" command. "blueutil -p toggle" works without any problem on Mac OS Mojave 10.14.6. If bluetooth power is on, it makes it off. If bluetooth power is off, it makes it on. – csonuryilmaz Dec 17 '19 at 2:42
24
  1. +Tab until you get to the Finder.
  2. ++G to bring up the Go To dialog: type in /Applications.
  3. Just type the letters "sys" and your highlight should be over "System Preferences". Press +O to open it.
  4. In System Preferences, the cursor should be in the search field. Just type in "bluetooth" and press Return. Now you're in the Bluetooth preferences.
  5. Press Tab, and there should be a faint highlight on the "On" checkbox.
  6. Press Space, and that should turn it on.

If you happen to have Quicksilver installed, invoke System Preferences from there and go directly to step 4 above. Or without Quicksilver press +Space to activate Spotlight, type "bluetooth" and go directly to the Bluetooth preference pane, and step 5 above.

If you don't have a Command key on the keyboard, then hit Ctrl+F2 to activate the Apple menu, press and go to System Preferences and continue at step 4 above.

If in Step 5 pressing Tab does not navigate through all inputs, then press Ctrl+F7 to activate Full Keyboard Access. When done, press Ctrl+F7 again to disable it.

  • 4
    1-3 can be replaced with: ⌘-space; type "sys"; hit enter. (⌘-space launches Spotlight.) – Jonik Mar 6 '10 at 19:35
  • This is a great answer! – Josh Mar 10 '10 at 20:09
  • 1
    Can't highlight the On checkbox with tabbing... change in snow leopard? – mbrownnyc Sep 1 '11 at 2:39
  • The last paragraph was the one I needed, thanks! – MikeSchinkel Dec 4 '11 at 6:33
  • 1-4 can be replaced with: ⌘-space; type "blue"; select Bluetooth, hit enter. (⌘-space launches Spotlight.) :-) – neu242 Aug 17 '12 at 9:52
8

I wanted to mention a little known feature of the OS:

If you reboot and unplug the keyboard, the OS will automatically enable Bluetooth and start looking for BT keyboards and mice. From Apple's official documentation:

  1. Turn on your Mac.
  2. If no USB mouse is detected, the Mac will power up to the Bluetooth trackpad or mouse setup assistant. The screen should alternate between an image of the trackpad and one of the mouse, as below.

However, this is apparently controlled by a Bluetooth setting which might be disabled:

Bluetooth Setup Assistant Settings

If this setting has been disabled by the user (it is enabled by default) then this method will not work.If these options have been disabled, you can re-enable them using the terminal commands:

sudo defaults write /Library/Preferences/com.apple.Bluetooth BluetoothAutoSeekKeyboard '1'
sudo defaults write /Library/Preferences/com.apple.Bluetooth BluetoothAutoSeekPointingDevice '1'

(However you might need to SSH in to do that, a which point one of the other answers might be better)

  • This is arguably better than any of the other answers :). Very little technical knowledge required. – msouth Dec 22 '14 at 16:25
  • But what if you don't have a wired keyboard or mouse - only Bluetooth ones? As far as I can tell the computer won't enable Bluetooth even with a reboot. – Ed Avis Mar 23 '15 at 18:19
  • I believe that the login screen will automatically enable Bluetooth if there's no HID devices connected. I'll look for a reference tonight – Josh Mar 23 '15 at 18:20
  • 1
    Following some instructions elsewhere, I unplugged everything from the iMac, plugged back just the power cord, and then switched it on. That worked (after a short delay at the login screen when it appeared not to). – Ed Avis Mar 24 '15 at 9:46
4

This method required the bluetooth menu bar status icon to show and used AppleScript GUI scripting (requires System Preferences » Universal Access » Support for assistive devices IIRC):

tell application "System Events"
    tell process "SystemUIServer"
        tell (menu bar item 1 of menu bar 1 whose description is "bluetooth")
            click
            click menu 1's second menu item
        end tell
    end tell
end tell

Call from command line using osascript:

osascript -e 'tell application "System Events" to tell process "SystemUIServer" to tell (menu bar item 1 of menu bar 1 whose description is "bluetooth") to {click, click (menu item 2 of menu 1)}'

Do not edit this post. I don't care if you don't like the scroll bar. It's easier to select by triple-clicking this way.


Alternatively, you can launch System Preferences and click the checkbox:

tell application "System Preferences"
    set current pane to pane id "com.apple.preferences.bluetooth"
    tell application "System Events"
        tell process "System Preferences"
            click checkbox "On" of window "Bluetooth"
        end tell
    end tell
    quit
end tell

While a GUI process launches, it isn't visible except for the Dock icon.

  • For Yosemite 10.10.3 I had to replace 'click checkbox "On" of window "Bluetooth"' with 'click button "Turn Bluetooth Off" of window "Bluetooth"' – user48420 Jul 1 '15 at 18:08
  • I just get an error which suggests that application System Events isn't running? – Chris F Carroll May 15 '19 at 10:45
4

Here is a faster way which I just did on Lion:

  1. Command + Spacebar to start spotlight
  2. type "bluetooth"
  3. Select "Bluetooth File Exchange"
  4. This will trigger a warning that bluetooth is disabled, the enable button should be highlighted so all you need to do now is press return
  • 1
    Worked on Mavericks, too! – Dennis Wurster Jun 13 '14 at 13:41
  • works on Catalina. The only useful answer here. – lobi Jul 8 '20 at 15:28
4

control+F8 activates the status menu.(upper right corner) If bluetooth button is enabled in the status menu, you can select the bluetooth-menu-option using the   ↑    ←  ↓   →   and  return   to activate bluetooth

Depending on your keyboard preference settings, you may need to press ctrl+fn+F8.

  • 1
    This sounds like a Windows keyboard shortcut instead of a OS X shortcut. – Ramhound Oct 7 '14 at 18:40
  • 3
    I don't really know why anyone down-voted this response. Maybe they didn't actually put in the effort to try it and see it does give a bit of help ? @Ramhound it actually works. I just tested it on my MacBook. I hold down the Fn + CTRL then strike the F8 key and voila ! It selects the Bluetooth in the menubar. With the wired keyboard, the user would then be able to navigate the Bluetooth menu to select his bluetooth settings and reactive his mouse/keyboard. So, yes, it's actually a OS X shortcut, not a Windows shortcut. – Danijel-James W Apr 29 '16 at 1:41
  • 1
    And just to add to this, I think it's ridiculous we all go and down-vote a new user for what reason without at least adding some comments to their answer to be more productive so we know and they know where in future it might be more clear or helpful. I don't know when the votes came in, before or after the comment about this sounding like it's a Windows keyboard shortcut. Did anyone actually bother to try this and compare it against the results of other users ? I don't think so. – Danijel-James W Apr 29 '16 at 1:46
  • The comment was CTRL+F8 not FN+CTRL+F8. I made the comment nearly 2 years, the answer honestly, seems incomplete. I don't find short answers like this very helpful, compared to the other answers, this was a late answers to an old question after 4 years. – Ramhound Apr 29 '16 at 11:30
  • I like the answer and I do not think it deserves down vote - in my mac is configured to use F8 (and all F keys) directly without the need to press fn first. So this answer worked perfectly for me, but the answers above the mentioned fn + Ctrl + F7, for example, did not. Do I need to downvote them - No afcource! Read and try and do not downvote unless it is really off topic. – Nik Todorov Nov 25 '17 at 23:18
3
  • Press Space, write "bluetooth".
  • Press the following combination: FnF7. A light blue frame appears arround the activate box.
  • Press spacebar, finished!
  • The sequence Fn⌃F7 activates full keyboard access; once you've turned it on you'll be able to simply tab between the control elements in the window. – Josh Ourisman Oct 31 '12 at 15:17
3

Use Alfred and the Bluetooth workflow

Alfred
http://www.alfredapp.com

Bluetooth Toggle

http://www.alfredforum.com/topic/1047-bluetooth-toggle/?hl=bluetooth

enter image description here

2

I use ^ B (Command + Ctrl + B) for this.

First install brewutil,

  1. brew update
  2. brew install blueutil

Second setup shoutcut,

  1. Start Automator.
  2. Open File -> New
  3. Select Service document type.
  4. Now select, Service receives no input in any application
  5. Now Add action - Run Shell Script
  6. And now enter the following script and click save

    export PATH=/usr/local/bin:$PATH
    bluetoothStatus=$(blueutil -p)
    [[ $bluetoothStatus -eq 0 ]] && blueutil -p 1 || blueutil -p 0
    
  7. Now go to System Preferences -> KeyBoard -> Shortcuts -> Services.
  8. Go to General section.
  9. The service created via automator will be listed there and a shortcut can be set.

The export line should be there even it is included in the ./bash-* files.

  • Best answer here really, works on Catalina. – Kevin Jul 9 '20 at 0:37
  • This was exactly what I was looking for! Thank you. – Ignat Oct 29 '20 at 14:38
  • Yeah, perfect!! Thanks – Michal Zaborowski Dec 28 '20 at 16:00
1

Simply turn on your Mac. press F then type "bluetooth" then press until you reach the "bluetooth" icon.

Then O and to enable Bluetooth! That's the easiest way to make it!

1

In my case, the CTRL+F8 method (posted by PIXIT, down below) is exactly what I need. Here's why: When I change the battery on my Magic Mouse, the computer often fails to reconnect the mouse. The other answers here talk about turning Bluetooth on or off. My Bluetooth is on, but I need to specifically activate the Mouse connection. Going through the status bar with the arrows lets me go down through the menu to My Mouse, and sideways to Connect.

(OS 10.10.3)

1

If you are using a apply keyboard (wired) - just press Option+F8. If you are using a Windows keyboard (wired) - just press Ctrl+F8.

1

If you are using Sierra OS then you can voice activate it through Siri "Turn on bluetooth", or off for that matter. You had the option to set the keyboard shortcut when you installed Sierra. Otherwise control and space is the default/or via Spotlight.

0

If you are attempting to reinstall OSX from boot media, and your Bluetooth wasn't enabled at the start (still an issue with Mountain Lion Recovery media), Ctrl + fn + F2 gets you to the menus at the top (as described many other places), which contain other useful utilities, like Terminal.

I'm lucky that my mouse was immediately recognized (I'm sure there's ways to delve further once this has been stirred), allowing me to click things which were otherwise completely stymied (like "install"), through one short terminal command: blued . The Bluetooth daemon kicked up and gave MAC addresses for probably two devices I have currently battery powered, and around. Hope that helps others, rather than forcing us all to get/keep USB wired mice around, dust free, and in workable condition.

Other extraneous USB pointing devices failed where this method succeeded for me. The computer I am working with has a fully powered and interactive Wacom Bamboo tablet-- this doesn't get anyone anywhere since I'm sure drivers aren't included/loaded at the point I found myself.

0

An updated version of the blueutil can be done using homebrew.

In a terminal:

  1. Assure you have homebrew installed:

    $ brew -v
    

    if command not found: then install it:

    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    
  2. update the packages

    $ brew doctor 
    
  3. install the package blueutil

    $ brew install blueutil
    
  4. check the bluetooth status (0 means off, 1 means turned on):

    $ blueutil -p
    
  5. set the state:

    $ blueutil -p on        # turns on the Bluetooth
    $ blueutil -p off       # turns off the Bluetooth
    

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy