Connecting Bluetooth Peripherals via terminal in Linux

Let’s say you’re device has a Bluetooth installed and wanna play around it with the terminal rather than a boring GUI which not so cool people do, you know what I’m saying geeks here like to play with the terminal right 🙂

Before start, make sure your device has a Bluetooth interface or else get a cheap USB Bluetooth dongle.

$ sudo apt install bluetooth

This will install bluetoothctl and bluetoothd.
Start the bluetooth service.

$ sudo service bluetooth start
$ sudo bluetoothctl
[bluetooth] agent on
[bluetooth] default-agent
[bluetooth] scan on
[bluetooth] devices
[bluetooth] pair <bluetooth_mac_address>

If you’re pairing a Bluetooth keyboard, it will show a key to pair the keyboard. Type that key using the Bluetooth keyboard and press enter key to get paired. Finally,

[bluetooth] connect <bluetooth_mac_address>
Akash Angle

I am a Full time Linux user who has quit using Windows for unknown reasons, making my life truly open source.

Recent Posts

Get the most juice from your ISP/router — setting MTU size & other handy tweaks

This is not an ad-vocation by any means for TP-link branding, however a real life…

3 months ago

How to make any Android phone up-to 3x faster – Developer options unleashed

First of all we need to hit the kernel version on any Android device. You…

3 months ago

systemd-resolve command not found in Ubuntu Desktop

Use resolvectl status instead. It's like something deprecates and suddenly things get broken! In systemd…

8 months ago

How to exclude multiple directories with rsync?

Geeky question: This is what people and friends have tried: rsync -arv --exclude "/home/john/.ccache:/home/ben/build" /home/john…

8 months ago

How to resolve apt-get -f not working

You might encounter this error which appears to be very common on Debian based Distro's…

8 months ago

How to install Broadcom STA wireless drivers on Kali Linux

PS: This article is for only Kali Linux users, that too having a Broadcom Wireless…

9 months ago