← 返回命令列表

Linux command

busctl 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Example

busctl list

Example

busctl --user list

Example

busctl status [service|pid]

Monitor

busctl monitor [service1] [service2] ...

Capture

busctl capture [service] > [bus-traffic.pcap]

Example

busctl tree [service1] [service2] ...

Introspect

busctl introspect [service] [path/to/object]

Get property

busctl get-property [service] [path/to/object] [interface_name] [property_name]

Call a method

busctl call [service] [path/to/object] [interface_name] [method_name]

说明

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.

参数

--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.

FAQ

What is the busctl command used for?

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.

How do I run a basic busctl example?

Run `busctl list` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --system do in busctl?

Connect to system bus (default).