Linux

Where Are Bluetooth Pairing Keys Stored on Linux?

BlueZ keeps link keys per adapter and device under /var/lib/bluetooth. The layout plus the dual boot trick.

Last updated

BlueZ stores pairing data under /var/lib/bluetooth, one folder per adapter named by its MAC. Inside sit settings, a cache dir, and one folder per paired device holding an info file. That file carries the [LinkKey] group with the hex key, type, and PIN length.

Everything is root only, so sudo is mandatory for reads and edits. The famous use is dual boot: pair in one OS, copy the key into the other's store, and the mouse stops demanding re pairing each switch. Restart bluetooth.service after hand edits.

Where Linux Bluetooth stores this, by platform

Linux
/var/lib/bluetooth

Adapter MAC folders inside, each with per device info files. Root owned; restart the bluetooth service after edits. Old BlueZ used a single linkkeys file instead of per device dirs.

Frequently asked questions

how do i stop re pairing bluetooth on dual boot

Pair once per OS, then copy the Windows key into the matching /var/lib/bluetooth/<adapter>/<device>/info [LinkKey]. Both systems then present the same identity and the device accepts either without repair.

why is var lib bluetooth empty for my device

Some LE setups cache differently, or pairing never completed. Re pair while watching the folder with sudo. bluetoothctl list identifies the default adapter when several exist.

Notice an outdated path? Let us know.