Thumbnail image

How to Activate Bluetooth With Just a Terminal on Linux

!
Warning: This post is over 365 days old. The information may be out of date.

Table of Contents

Intro

bluetooth is one of the technologies that must exist in every computer device, because of its many, many uses, not only for file transfers, but bluetooth can also be used to connect sound wirelessly.

according to wikipedia

Bluetooth is the industry specification for wireless personal area networks (PAN). bluetooth connects and can be used to exchange information between devices. The specifications of this bluetooth device are developed and distributed by the bluetooth special interest group.

because of its relatively large scale of use, bluetooth is used quite often.

in this article I will give a tutorial on how to activate bluetooth simply, just use a terminal shell.


Requirements

bluez-utils bluez


Step-by-step

  1. install bluez and bluez-utils, both are basic packages to enable bluetooth on linux.
  2. After installing both, continue to enable the bluetooth service to run on the daemon. if you are using systemd type the following command:
    systemctl start bluetoothd
    
    whereas if you use openrc then the following command:
     sudo rc-service bluetoothd start
    
  3. now we will use the bluetoothctl command line
    • buka controller bluetooth bluetooth
      bluetoothctl
      
    • to activate the bluetooth controller type
      [bluetooth]# power on
      
    • scan the * device * to be connected
      [bluetooth]# scan on
      
      after being scanned, a number will appear which leads to the device in question
    • connect bluetooth on the device in question, for example, my device is 22:22:0a:53:72:c9
      [bluetooth]# connect 22:22:0A:53:72:C9
      
      if you are not sure which device you want to connect, check the registered/scanned devices by typing devices, a device name with number will appear.
    • pair beetween 2 device
    • voila..! bluetooth is connected

Outro

activate connect bluetooth by typing commands, very fun isn’t it? yeah i see. I’m sure you feel you’re hacking, or muttering in your heart I’m a hacker. but frankly, this method is very cool to do, in front of my friends, hehe..


Related Posts