Use varlinkctl to inspect a Varlink service before calling it: identify how it is exposed, list its interfaces, inspect the relevant interface definition, then construct a call from the method signature. This avoids guessing socket paths, method names, or JSON arguments. The commands and options available depend on the installed systemd version, and documented socket paths are examples—not guarantees that a socket exists on your host.
What varlinkctl does
varlinkctl is a command-line client for getting information about Varlink services, discovering and inspecting interfaces, invoking methods, and validating interface definition files. The Debian trixie manual records the core commands as introduced in systemd 255; options and commands added later may not be available on an older installation. Check varlinkctl --version and the local varlinkctl man page before relying on a newer feature. Debian trixie varlinkctl(1) manual
As an Amazon Associate I earn from qualifying purchases.
How do I find a systemd Varlink socket?
First determine whether the service is reached through a local socket, a local executable, or an SSH-mediated endpoint. The manual accepts explicit service references as well as a socket or executable filesystem path directly:
| Address form | Where and what it reaches | Important detail |
|---|---|---|
unix:/absolute/path/to/socket |
Local filesystem Unix socket | The path must exist and be accessible on the host. |
unix:@name |
Local abstract-namespace Unix socket | Abstract sockets are not supported by the ssh-unix: mode. |
exec:/absolute/path/to/program |
Local executable | varlinkctl starts the program and passes it a connected stream socket. |
ssh-unix:host:/absolute/path/to/socket |
Remote Unix socket over SSH | The server requires OpenSSH 9.4 or newer; abstract-namespace sockets are unsupported. |
ssh-exec:host:/path/to/command |
Remote program over SSH | The program communicates using Varlink over standard input and output. |
These are address syntaxes, not a list of sockets guaranteed to be installed by systemd. The service’s configuration and host setup determine whether a socket is present and which path it uses. If you have a candidate address from service documentation or local configuration, use it for discovery rather than assuming a path from another machine applies.
#1 Best Overall
How do I inspect a Varlink interface?
Start with service metadata, then enumerate interfaces and inspect the interface you intend to use. The following sequence is the manual’s example for investigating systemd-resolved; the path and interface may not be present on your host:
varlinkctl info /run/systemd/resolve/io.systemd.Resolve
varlinkctl list-interfaces /run/systemd/resolve/io.systemd.Resolve
varlinkctl introspect /run/systemd/resolve/io.systemd.Resolve io.systemd.Resolve
inforeports basic service metadata and its implemented interfaces.list-interfaceslists the interfaces offered by the service.introspectdisplays an interface definition, including its methods and signatures.
Use the interface definition to establish the fully qualified method name and the required argument fields before you prepare a call. list-methods is another discovery command, but the cited manual marks it as added in systemd 257, so it may be unavailable on older systems. Command descriptions and version notes
How do I call a Varlink method with JSON?
Pass the service address, fully qualified method name, and a JSON argument object. This is the executable example from the manual, not a command verified on your machine:
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →varlinkctl call /usr/lib/systemd/systemd-pcrextend
io.systemd.PCRExtend.Extend
'{"pcr":15,"text":"foobar"}'
In this example, io.systemd.PCRExtend.Extend is the method and the final argument is the JSON object supplied to it. Omit the JSON argument on the command line to have varlinkctl read it from standard input. Use {} for a method with no parameters. Reply parameters are written as JSON to standard output. Always match the argument object to the signature shown by introspection; a syntactically valid JSON object can still have the wrong fields or values for a method.
How should I handle methods that return multiple replies?
Choose output handling based on what the method does and what will consume its replies. The manual documents these options for methods that support multiple replies:
| Option | Output behavior | Use when |
|---|---|---|
--more |
Sets the Varlink more flag and writes replies as JSON-SEQ, separating individual replies. | You need to process a reply stream rather than wait for one collected result. The manual marks this option as added in systemd 255. |
--collect |
Collects replies into a JSON array. | Your consumer expects one array containing the replies. The manual marks this option as added in systemd 256. |
The manual documents a default call timeout of 45 seconds. For a continuous update stream, it says an infinite timeout is typically desirable; an enumeration expected to finish quickly can instead benefit from a finite timeout. Set a timeout deliberately where needed, for example with --timeout=infinity for a continuing stream. These settings do not make a single-reply method into a streaming method: the method’s semantics must support the behavior. Streaming and timeout options
Rank #4
Can varlinkctl validate an interface definition?
Yes. varlinkctl validate-idl [FILE] parses and checks a Varlink interface definition for syntax and internal consistency. If you omit the file, it reads the definition from standard input. Treat this as a check of the local definition file: it does not establish that a running service implements the same definition, authorize a caller, or certify that invoking a method is safe.
What can a systemd service’s Varlink API expose?
systemd-nsresourced illustrates why inspecting the live interface matters: its documentation says it exposes io.systemd.NamespaceResource over Varlink for registering user namespaces and assigning mounts, cgroups, and network interfaces. That documentation does not establish a socket address or a method-call command for the API, so neither should be inferred from the interface name. Inspect the service’s available interface definition on the host before constructing a call. systemd-nsresourced.service(8) manual
Quick Recap
Best Value
- New
- Mint Condition
- Dispatch same day for order received before 12 noon
- Guaranteed packaging
- No quibbles returns
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.




