How To Pair Bluetooth Devices
Ubuntu MATE, like many Linux distributions, provides the software you need to support Bluetooth connections to headphones, mice, keyboards, or other computing devices. These illustrations are specific to Ubuntu MATE 22.04, but they apply to many other desktop Linux distributions.
The most common and easiest method of connecting (pairing) a Bluetooth device with a Linux desktop is to use the Bluetooth management utilities provided with your Linux distribution. Ubuntu MATE provides the blueman-applet that appears as an icon in the top panel and the blueman-manager software package for managing and pairing Bluetooth devices.
How To Connect Devices Graphically
In order to use a Bluetooth device like a mouse or a headset, you first need to connect (pair) your computer and the device. Before you begin, make sure Bluetooth is enabled. Some computers allow you to disable Bluetooth from BIOS/UEFI. Check your BIOS settings to ensure that, if you have this setting, Bluetooth is enabled. Some laptops have a function key or other button that toggles Bluetooth and/or Wifi on and off. If your computer has this capability, make sure that Bluetooth is enabled in that way as well.
- Click the Bluetooth icon in the upper panel and select Devices. The Bluetooth device setup assistant will open to help you in configuring and connecting Bluetooth enabled devices.
- Make the other Bluetooth device discoverable or visible (or put it in pairing mode) and place it within 30 feet (about 10 meters) of your computer.
- Click Search. Your computer will begin searching for devices. If the device you want to pair is not in the list, click the magnifying glass icon to begin the search again.
- Right-click on the device you want to pair and select Connect. The pairing should happen automatically.
- In the notification area, click Confirm to accept the pairing request.
Note: You need to finish your connection within about 20 seconds on most devices or the connection will not be successful. If that happens, return to the device list and start again.
How To Connect Devices Using The Command Line
If the graphical method doesn't work for your Bluetooth device, or if your device does not show up in the search results, there is another way to complete the pairing using the bluetoothctl command-line utility provided with Ubuntu MATE. In this example, we connect a Bluetooth 3.0 Keyboard.
- From the menu, open MATE Terminal.
- In the terminal, type
bluetoothctl
and press Enter. - The terminal will display:
agent registered
- Now type
scan on
and press Enter to begin the discovery process. - Note the MAC address of the keyboard or device you want to connect. You will it need to activate the Bluetooth pairing on the keyboard.
- Let's assume the MAC address of the keyboard is ab:cd:ef:12:34:56
- Stop the Bluetooth pairing on the keyboard otherwise, the following option won't work. To do this, type
scan off
and press Enter. - Type
trust ab:cd:ef:12:34:56
and press Enter. - Type
pair ab:cd:ef:12:34:56
and press Enter. - Bluetooth pairing begins. If a prompt for a pin appears, use the pin provided by your device maker and press the Enter key on your keyboard. The pin for many devices is four zeroes. (0000)
- Type
exit
to quit the utility.