Skip to content

busctl

Low-level command-line tool for inspecting, monitoring, and manipulating D-Bus services, objects, interfaces, and properties


List all services on the system bus

busctl list

List all services on the user bus

busctl --user list

Power on bluetooth device

busctl set-property org.bluez /org/bluez/hci0 org.bluez.Adapter1 Powered b true

Power off bluetooth device

busctl set-property org.bluez /org/bluez/hci0 org.bluez.Adapter1 Powered b false

Set device to become trusted

busctl set-property org.bluez /org/bluez/hci0/dev_88_C9_E8_1E_9F_B5 org.bluez.Device1 Trusted b true

Monitor bus

busctl --user monitor | grep -iE 'logout|shutdown|reboot|poweroff'

Inspect a D-Bus service (introspect)

busctl introspect org.freedesktop.login1 /org/freedesktop/login1

Show all properties of a D-Bus object

busctl get-property org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager IdleHint

Call a method (reboot the system)

busctl call org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager Reboot b true

Monitor system power and sleep events (expert)

busctl monitor org.freedesktop.login1

List objects exposed by a service (tree view)

busctl tree org.bluez

List interfaces implemented by an object

busctl tree org.bluez | grep -oE '/org/bluez/hci[0-9]+$'

Set hostname via D-Bus (expert)

busctl call org.freedesktop.hostname1 /org/freedesktop/hostname1 org.freedesktop.hostname1 SetStaticHostname sb "myhost" true

Watch all method calls and signals (expert, noisy)

busctl monitor --all

Flatten Adapter1 properties to plain JSON values

busctl --json=short call \
  org.bluez /org/bluez/hci0 \
  org.freedesktop.DBus.Properties GetAll \
  s org.bluez.Adapter1 \
| jq '.data[0] | with_entries(.value = .value.data)'

Show Adapter1 properties as key=value pairs (terminal-friendly)

busctl --json=short call \
  org.bluez /org/bluez/hci0 \
  org.freedesktop.DBus.Properties GetAll \
  s org.bluez.Adapter1 \
| jq -r '.data[0] | to_entries[] | "\(.key)=\(.value.data|@json)"'

Select specific Adapter1 properties as JSON

busctl --json=short call \
  org.bluez /org/bluez/hci0 \
  org.freedesktop.DBus.Properties GetAll \
  s org.bluez.Adapter1 \
| jq '.data[0] | {Address: .Address.data, Name: .Name.data, Alias: .Alias.data, Powered: .Powered.data, Discovering: .Discovering.data}'

Preserve DBus types while compacting Adapter1 output

busctl --json=short call \
  org.bluez /org/bluez/hci0 \
  org.freedesktop.DBus.Properties GetAll \
  s org.bluez.Adapter1 \
| jq '.data[0] | map_values({type: .type, value: .data})'