LinuxCommandLibrary

busctl

Introspect and monitor the D-Bus message bus

TLDR

Show all peers on the bus
$ busctl list
copy
Show all peers on the user session bus
$ busctl --user list
copy
Show process information for a service or PID
$ busctl status [service|pid]
copy
Monitor messages on the bus
$ busctl monitor [service1] [service2] ...
copy
Capture bus traffic in pcap format
$ busctl capture [service] > [bus-traffic.pcap]
copy
Show object tree of services
$ busctl tree [service1] [service2] ...
copy
Introspect an object's interfaces
$ busctl introspect [service] [path/to/object]
copy
Get property value from an object
$ busctl get-property [service] [path/to/object] [interface_name] [property_name]
copy
Call a method on an object
$ busctl call [service] [path/to/object] [interface_name] [method_name]
copy

SYNOPSIS

busctl [command] [options] [arguments]

DESCRIPTION

busctl introspects and monitors the D-Bus message bus. D-Bus is an inter-process communication system used extensively in Linux for communication between system services and desktop applications.
The tool can list services, monitor message traffic, inspect object hierarchies, and invoke methods on D-Bus objects.

PARAMETERS

--system

Connect to system bus (default).
--user
Connect to user session bus.
--address ADDRESS
Connect to the bus specified by ADDRESS.
-j, --json=MODE
Output in JSON format. MODE is short, pretty, or off.
--verbose
Show verbose output for call or get-property commands.
--expect-reply=BOOL
Whether to wait for method call completion. Defaults to yes.
--auto-start=BOOL
Whether method calls should auto-start the target service. Defaults to yes.
--list
Show a flat list instead of a tree with the tree command.
--unique
Show only unique bus names (e.g., :1.42).
--acquired
Show only well-known bus names.
--activatable
Show only activatable services not yet started.
--no-pager
Disable pager.
--no-legend
Do not print column headers and footers.

SUBCOMMANDS

list

List all peers on the bus
status
Show process info for a service or PID
monitor
Watch message traffic
capture
Capture bus traffic in pcap format
tree
Show object hierarchy
introspect
Examine object interfaces
get-property
Read a property value
set-property
Set a property value
call
Invoke a method
emit
Emit a signal
wait-signal
Wait for a specific signal

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard