Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Use busctl when you need a systemd value or operation exposed through D-Bus, rather than scraping a human-oriented systemctl display. Start with read-only discovery: choose the right bus, find the service’s objects, inspect the interface, and retrieve the property. Keep using systemctl for high-level service management; the two tools expose different interfaces.

What busctl does—and when to use it

busctl is systemd’s command-line tool for inspecting and monitoring D-Bus. D-Bus services expose objects; objects provide interfaces; and interfaces contain methods, signals, and properties. Introspection shows which members an object exposes. The D-Bus specification describes object introspection and the standard properties interface at dbus.freedesktop.org/doc/dbus-specification.html.

Use busctl when the data you need is available as a D-Bus property, or when you need to inspect or call a D-Bus method that systemctl does not present in the form you need. It provides access to the service’s object and interface structure and returns typed values. It is not a drop-in replacement for every systemctl command, and no general speed or reliability advantage is established for direct queries.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For systemd’s system manager, the well-known bus name is org.freedesktop.systemd1 and its manager object is at /org/freedesktop/systemd1. The manager API and unit objects are documented in the systemd D-Bus API reference at freedesktop.org/wiki/Software/systemd/dbus/; that wiki page notes that it is obsolete and superseded by the org.freedesktop.systemd1 manual, so consult the current documentation for release-specific details.

How to use busctl on Linux: discover a service and read a property

Use --system for system services and --user for services on your user’s session bus. The systemd manager example below is explicitly on the system bus. It follows a safe discovery-to-read path using commands documented by the systemd busctl manual.

  1. Check which busctl options your installed version supports with busctl --version and busctl --help. Distribution packages can differ from upstream documentation.

  2. List names on the system bus: busctl --system list. This can help confirm that a service is present. A name may be well-known, such as org.freedesktop.systemd1, or a unique bus name.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  3. Show the systemd service’s exported object tree: busctl --system tree org.freedesktop.systemd1. Use this to find object paths rather than assume every service uses the same layout.

  4. Inspect the manager object and its interface: busctl --system introspect org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager. The optional interface argument narrows inspection to that interface.

  5. Read a manager property, for example LogLevel: busctl --system get-property org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager LogLevel. The output includes a D-Bus type signature as well as the value.

What the busctl command arguments mean

What is the difference between introspect and get-property?

introspect discovers the interfaces and members an object exposes. It can show methods, signals, and properties, including their signatures. get-property retrieves the current value of one named property once you know the service, object path, interface, and property.

For a service and object path you already know, the general forms are:

busctl --system introspect SERVICE OBJECT_PATH [INTERFACE]
busctl --system get-property SERVICE OBJECT_PATH INTERFACE PROPERTY

Replace the capitalized terms with values found in the service’s documentation or introspection output. A property value is typed on D-Bus; do not assume its representation or units match a human-readable command’s display. For example, systemd time-valued properties are usually encoded in microseconds on the bus, even when a corresponding unit-file setting is expressed in seconds.

How to read structured or JSON output

By default, output is compact. The --verbose option can make compound values easier to interpret by exposing more of their typed structure. The manual also documents JSON output modes for property reads and method calls, which can be useful when another program consumes the result.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Option availability depends on the installed systemd version. If an option is rejected, check busctl --help and the manual for your distribution’s package rather than assuming every system supports the current upstream options. JSON output changes the presentation, not the underlying fact that D-Bus values have types.

Read, invoke, and write are different operations

Keep discovery and reading separate from actions. get-property reads a value; call invokes a method; set-property writes a property. A method may change system state or trigger other effects, and a property write changes a value. Before using either action command, confirm its signature, consequences, and permission requirements in the service documentation.

  1. Confirm the bus, destination, object path, and interface.

  2. Introspect the object and verify the method or property signature and argument types.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  3. Read the service documentation to understand the operation’s effects and required authorization.

    Best Value
    Sale
    UNIX and Linux System Administration Handbook, 4th Edition
    • New
    • Mint Condition
    • Dispatch same day for order received before 12 noon
    • Guaranteed packaging
    • No quibbles returns
  4. Only then run the operation, and check both its response and command exit status.

For systemd’s PID 1, sensitive operations are subject to low-level D-Bus policy. An unprivileged process may be denied, but permission denial is only one possible failure: the service or object may be missing, the wrong bus may have been selected, or the method may not be supported. Do not assume that every failure calls for sudo or indicates a malformed signature.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Version and compatibility checks

The upstream manual marks list and status as available since systemd v209, and capture, tree, and introspect since v218. Its documented call command entry is marked since v257. These are upstream command-history annotations, not a guarantee about the version or options packaged by a particular Linux distribution. Check busctl --version, busctl --help, and your distribution’s manual or package documentation. Availability by default is not established for every distribution.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Troubleshoot a query that fails

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.