If you’re like most people, you probably use a computer for work and play. But what if you want to use your computer to control your music or video playback from your phone or other Bluetooth-enabled device? In this article, we’ll show you how to set up Bluetooth on Linux so that you can do just that. Bluetooth is a wireless technology that allows devices to connect wirelessly. It’s commonly used in phones and other portable devices, but it can also be used with computers. If you’re not familiar with Bluetooth, it’s worth reading our introduction before continuing. To get started, we need to install some software. On Ubuntu or Debian-based systems, the easiest way to do this is using the apt package manager: sudo apt-get install bluetooth bluez btusb On Fedora or RHEL systems, the installation process is a little more complicated. You’ll first need to enable the EPEL repository: 2 sudo yum install epel-release 3 sudo yum update 4 sudo yum install bluetooth bluez btusb Next, we need to install the BlueZ package:5 6 sudo dnf install bluez Finally, we need to configure Bluetooth on our system:7 8 sudo bluetoothctl 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 ..


Sometimes your Linux distribution doesn’t detect your laptop’s Bluetooth hardware. Or perhaps you want to add a USB Bluetooth dongle to a desktop computer. Either way, here’s how to get Bluetooth working.

The Bluetooth Saga

Bluetooth is named after a 10th-century Danish king, Harald Bluetooth. He was known as the unifying king. By encouraging communication between the many differing factions, he consolidated the country under Christianity.

Ericsson released Bluetooth, the short-range wireless communication standard in 1998. The Linux kernel first supported Bluetooth functionality in 2001, with full support coming in 2005. Nowadays, Bluetooth can be used to connect all manner of devices to your computer, including smartphones, headsets, speakers, keyboards, mice, and printers.

Despite Bluetooth being a mature and well-established standard, sometimes the Bluetooth hardware in your laptop isn’t recognized or detected during the installation of your preferred Linux distribution. That’s not a show-stopper; you can add the software required for Bluetooth capability manually.

If your computer doesn’t have integrated Bluetooth hardware, you’ll need to use an external USB adapter or dongle, and install the required Bluetooth software stack. Looking for one that other Linux users have commented on and given positive feedback, such as the Panda Nano Adapter, is a wise move.

The official Linux Bluetooth software suite is BlueZ, created and administered by the BlueZ Project. Blueman is an independent project to provide a front-end for BlueZ.

Installing the Software

We need to install BlueZ and its associated utilities. We also need to install Blueman, which is packaged separately.

We can install BlueZ on Ubuntu like this (note the asterisk “*“):

-1

To install Blueman, use this command:

On Fedora, you need to type:

Install Blueman like this:

On Manjaro the packages are called:

This will install Blueman for you:

Starting the Bluetooth Daemon

To have Bluetooth available each time you boot your computer, we need to enable and start bluetooth.service, the daemon that Bluetooth connectivity. We do this with systemctl.

Enabling the service means it’ll be started with each boot of your computer. Starting the service makes it run right away, so you can use Bluetooth without having to reboot your computer.

Checking the Status

We can check that Bluetooth is up and running using the rfkill command. This scary-sounding command lets us check the health and status of wireless communications, and Bluetooth falls into that category.

Using rfkill without any command-line parameters lists the wireless adapters, and shows whether they are blocked or unblocked.

We can see that Bluetooth is present, but blocked. We can sort that out using rfkill with its unblock option. Of course, you might find that your adapter is unblocked, in which case you don’t need to perform the next step.

Now we can check the status once more.

The Bluetooth adapter is now unblocked, so we can go ahead and start to use Bluetooth.

Using Bluetooth in GNOME

In GNOME, Bluetooth functionality can be accessed from the system menu. When active Bluetooth hardware is detected, a new “Bluetooth” menu item appears.

Expanding the menu item reveals two options. You can turn Bluetooth off or on, and you can access the Bluetooth settings. This opens the regular “Settings” application and takes you to the “Bluetooth” pane.

So that we had something to connect to, we set a Bluetooth headset to broadcast its availability for pairing. Our laptop found the device and listed it as a Bluetooth device in the vicinity of the laptop. It had been detected, but it was not paired to the laptop. Its status was reported as “Not set up.”

Clicking on the “Not set up” text started the connection process. In our case, the devices communicated and connected. Some devices send a code number to the computer, which GNOME displays. If that’s the case you need to click the “Accept” or “Connect” button in the notification that displays the code.

In our case, there were a couple of bleeps and the device was connected. Its status was updated in the “Settings” application. Clicking anywhere in the gray shaded bar around the Bluetooth device opens an options window.

This gives you some information about the connected device. There is a slider button that allows you to turn the connection on or off, and a “Remove Device” button that will remove the device from your Bluetooth settings altogether. Your computer will forget everything about the device. You’ll need to reconnect to it if you wish to use it in the future.

If there are more settings available for your device—it depends on the category of the device, and what functionality the device manufacturers have made available through their Bluetooth interface—there’ll be a button that allows you to access them.

Because our device was a headset, the settings control the audio output of the device. Our button was labeled “Sound Settings.” Clicking the “Sound Settings” button opened a dialog with audio settings in it.

Using Blueman

If you don’t use GNOME as your desktop environment, there’s likely to be some integration of Bluetooth functionality in your preferred desktop. If there’s not, you can use Blueman to manage your Bluetooth connections. Or perhaps you administer a collection of Linux computers, with different desktop environments on them. Using Blueman allows you to have a consistent management experience across them all.

Blueman is short for Bluetooth Manager. Launch the Blueman application in GNOME by pressing the “Super” key, usually located between the left-hand “Ctrl” and “Alt” keys, and typing “blue.”

The Blueman icon will appear. Click it to launch the application. The Blueman application will appear.

We’d disconnected our Bluetooth headset, and had set it to “discoverable.” Clicking the “Search” button in the Blueman toolbar started a search for nearby Bluetooth devices.

Our headset was discovered and listed. Your device will be listed with a name or label that tells you what it is. Clicking its entry in the device listing, then clicking on the key-shaped “Create Pairing” button will start the pairing and connecting process.

You can do the same thing by right-clicking the device listing and selecting “Connect” from the context menu.

When the device is connected a very small key symbol is added to its icon in the Blueman device listing, and a set of icons are added to the right-hand end of the device entry, showing the different services that Bluetooth connection can use.

If the device sends a pairing code to your computer it will be displayed in a notification or small dialog. If this happens, click the button in the dialog labeled “Accept”, “Pair”, “Connect” or similar.

Using More Than One Bluetooth Adapter

It’s possible to use more than one Bluetooth adapter at a time. There is built-in Bluetooth hardware in the laptop we used to research this article, but we thought we’d add another, external, USB adapter to see how it was handled.

The built-in Bluetooth hardware was identified in the “Adaptor” menu using the name of the laptop, “acheron.”

When the external Bluetooth adapter was plugged into a USB port, it was added to the “Adaptor” menu as “acheron #2.”

This lets you quickly hop between adapters. You could choose to have some devices connected to the internal Bluetooth adapter and some connected to the external adapter. When you select an adapter from the menu, you’ll only see the devices that are connected to that adapter.

Get Connected

Using Bluetooth on Linux is a lot easier than it used to be. It’s quick and easy to set up and painless to connect to devices. It’s good to connect, as King Harald may have once said.

RELATED: Fix: Why Isn’t Linux Detecting My Wi-Fi Adapter?