bluetoothctl Command Examples in Linux

bluetoothctl is a command-line utility in Linux that is used to manage Bluetooth devices and settings. bluetoothctl is a part of the bluez package, which is a suite of tools and libraries for managing Bluetooth devices on Linux systems.

To use bluetoothctl, you will need to have the bluez package installed on your Linux system. You can install bluez using the package manager for your specific distribution of Linux. For example, on an Ubuntu system, you can use the apt command to install bluez:

$ sudo apt install bluez

Once bluez is installed, you can start the bluetoothctl utility by running the bluetoothctl command. bluetoothctl will start in interactive mode, allowing you to enter commands and manage your Bluetooth devices and settings in real-time.

bluetoothctl Command Examples

1. Enter the `bluetoothctl` shell:

# bluetoothctl

2. List all known devices:

# bluetoothctl devices

3. Power the Bluetooth controller on or off:

# bluetoothctl power on|off

4. Pair with a device:

# bluetoothctl pair mac_address

5. Remove a device:

# bluetoothctl remove mac_address

6. Connect to a paired device:

# bluetoothctl connect mac_address

7. Disconnect from a paired device:

# bluetoothctl disconnect mac_address

8. Display help:

# bluetoothctl help
Related Post