Pair and Connect Bluetooth Headphones with bluetoothctl

Scan, pair, trust and connect Bluetooth headphones from the terminal using bluetoothctl, then route audio through PulseAudio or PipeWire.

LinuxhardwareaudiobluetoothLow risk
Run `bluetoothctl scan on`, note your headphones' MAC address, then `bluetoothctl pair XX:...:XX && bluetoothctl trust XX:...:XX && bluetoothctl connect XX:...:XX`.

01Command

Command
$ bluetoothctl power on && bluetoothctl scan on && bluetoothctl devices && bluetoothctl connect XX:XX:XX:XX:XX:XX

02What it does

Scanning runs until you type `scan off`; headphones must be in pairing mode to appear. `trust` lets the headphones reconnect automatically next time, and PulseAudio/PipeWire switch the audio output automatically once connected. The commands can be chained one per line in the interactive shell or joined with && for scripting.

03Risk

RiskLow risk
Requirementsbluez (bluetoothctl, preinstalled on most desktop distros), a Bluetooth adapter, and bluetoothd running. Pairing for a new device is interactive: `bluetoothctl pair XX:XX:XX:XX:XX:XX`.
!Warning: If connect fails repeatedly, the headset may be connected to your phone — disconnect it there first. Headphones using the LDAC/aptX codec need PipeWire or the right PulseAudio modules to appear as an audio output.

04Undo

Undo
$ bluetoothctl disconnect XX:XX:XX:XX:XX:XX

05Sources

  • Bluetooth headset - ArchWiki
    Arch Linux Wiki · technical · 2026-09-17
    Evidence: Shows the bluetoothctl pairing workflow for headsets: scan, pair, trust and connect, and mentions audio profile requirements.
  • bluetoothctl(1) — Arch manual page
    Arch Linux · technical · 2026-09-17
    Evidence: bluetoothctl is the interactive control utility of bluez, supporting power on, scan on, pair, trust, connect and disconnect commands for Bluetooth devices.

Last verified: 2026-09-18 · Category: System & Settings

06Related solutions