X
Tech
Why you can trust ZDNET : ZDNET independently tests and researches products to bring you our best recommendations and advice. When you buy through our links, we may earn a commission. Our process

'ZDNET Recommends': What exactly does it mean?

ZDNET's recommendations are based on many hours of testing, research, and comparison shopping. We gather data from the best available sources, including vendor and retailer listings as well as other relevant and independent reviews sites. And we pore over customer reviews to find out what matters to real people who already own and use the products and services we’re assessing.

When you click through from our site to a retailer and buy a product or service, we may earn affiliate commissions. This helps support our work, but does not affect what we cover or how, and it does not affect the price you pay. Neither ZDNET nor the author are compensated for these independent reviews. Indeed, we follow strict guidelines that ensure our editorial content is never influenced by advertisers.

ZDNET's editorial team writes on behalf of you, our reader. Our goal is to deliver the most accurate information and the most knowledgeable advice possible in order to help you make smarter buying decisions on tech gear and a wide array of products and services. Our editors thoroughly review and fact-check every article to ensure that our content meets the highest standards. If we have made an error or published misleading information, we will correct or clarify the article. If you see inaccuracies in our content, please report the mistake via this form.

Close

When Bluetooth on Linux fails, this command can come to the rescue. Here's how to set it up

If your Linux distribution is having trouble with Bluetooth, and the GUI isn't helping, there's a command you can use that has a better chance of solving your problem.
Written by Jack Wallen, Contributing Writer
Penguins representing LInux
Kelly Cheng Travel Photography/Getty Images

I recently received a pair of speakers to review that promised to be quite good (they are impressive and the review is coming soon). However, fairly soon into the setup, the headphones posed a problem.

Before I continue, let me first explain that I have a complex setup. Being an audiophile, I listen to a lot of vinyl. I also listen to a good amount of music via streaming services. Mostly, I use Spotify to find new artists, and I will then purchase vinyl albums of the music. Also, given how much time I spend in my office and at my desk, the system I use to listen to music isn't 100% audiophile-grade. That issue is partly due to the makeup of my office and also the presence of cats, who would happily murder floor-standing speakers.

Also: How to vastly improve sound on Linux with EasyEffects

My old speakers had both AUX and line-in inputs, which allowed me to plug my turntable into AUX and my PC into line-in. Those two inputs served me well. However, the new speakers had an RCA line-in and a 3.5mm line-in. Obviously, I couldn't use both inputs and expect the system to work. Out of curiosity, I tried -- and the RCA input was always hijacked by the 3.5mm input, so that was a no-go.

Fortunately, the new speakers included Bluetooth support. It's, therefore, a good thing my System76 Thelio desktop computer included Bluetooth, which meant everything should have been a simple matter of connecting the speakers via Bluetooth and using that connection as a means to listen to digital audio from the computer.

Also: How to improve the quality of Spotify streaming audio

However, I immediately ran into a problem. When I opened Bluetooth Settings and switched the speakers on, Ubuntu Budgie couldn't find any devices to connect with. Bluetooth was seemingly broken.

The good news is I'm using Linux -- and there's always a fix at the ready. This time around, the fix came by way of the bluetoothctl command. I'm going to show you how this tool works.

How to install bluez

What you'll need: To make this feature work, you'll need a machine that includes a Bluetooth option and a user with sudo privileges (for the installation of bluez, which provides the bluetoothctl command).

1. Open a terminal window

The first thing to do is open a terminal window, so you can install Bluez. You should find the terminal window app in your desktop menu.

2. Install Bluez

How you install Bluez will depend on the distribution you use. Here's a quick list of the commands for various distributions:

Debian/Ubuntu - sudo apt-get install bluez -y
Feodra - sudo dnf install bluez -y
Arch Linux - sudo pacman -S bluez-utils

Using bluetoothctl

1. Start and enable bluetoothctl

Before you can use the bluetoothctl command, you must start and enable it with:

sudo systemctl enable --now bluetoothctl

2. Scan for nearby devices

Next, we're going to use the bluetoothctl command to scan for nearby devices. That command is:

bluetoothctl scan on

At this point, you should be able to go back to your distribution's Bluetooth GUI tool and see that it's finally discovered all available devices. You can then select the device you want to connect to via the GUI -- and everything should just work.

Also: Love listening to records? This simple, sound-enhancing gadget is a must-have

This workaround isn't the ideal solution, but when you find Bluetooth is being a bit problematic, it's one way I've found that rarely fails me.

Editorial standards