Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Systemd Knowledge Patch?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/nevaberry-systemd-knowledge-patch)
---
name: systemd-knowledge-patch
description: systemd
version: "262"
license: MIT
metadata:
author: Nevaberry
---
# systemd Compatibility Guidance
Load this skill when migrating systemd deployments, writing units, configuring
networkd or udev, building boot images, or integrating systemd APIs and tools.
Use the topic references for complete settings, examples, and version-specific
behavior; the quick reference below concentrates on migration and common tasks.
## Reference index
| Reference | Topics |
| --- | --- |
| [Compatibility, builds, and administration](references/compatibility-build-and-administration.md) | System V migration, build requirements, runtime libraries, configuration lookup, machine identity and tags, clocks, CLI introspection |
| [Units and activation](references/units-and-activation.md) | Environment expansion, reloads, restarts, conditions, jobs, transient units, timers, sockets, mount dependencies |
| [Resource control and sandboxing](references/resource-control-and-sandboxing.md) | Cgroups, OOM, user namespaces, private mounts, quotas, concurrency, NUMA, verified execution |
| [Devices and administrative tools](references/devices-and-administration.md) | Udev rules and ownership, device links, tmpfiles, sysctl, first boot, SELinux, terminals |
| [Network configuration](references/networking.md) | Forwarding, VLANs, NAT, naming, reloads, DHCP, routing, offloads, cellular modems |
| [Resolution, observability, and IPC](references/resolution-observability-and-ipc.md) | DNS, journals, coredumps, Varlink, event loops, execution diagnostics, signed reports |
| [Credentials and enrollment](references/credentials-and-enrollment.md) | Credential formats and brokers, null-key policy, TPM enrollment, crypttab, PKCS#11, FIDO2 |
| [Boot, UKIs, and TPM policy](references/boot-uki-and-tpm.md) | Boot discovery, initrd, factory reset, UKIs, Secure Boot, PCR policies, NvPCRs, kexec |
| [Images, storage, and extensions](references/images-storage-and-extensions.md) | Repart, dissection, integrity, OCI, mount brokers, portable services, extensions, sysupdate |
| [Containers and virtual machines](references/containers-and-virtual-machines.md) | Nspawn, vmspawn, machined, SSH, mapped users, VM disks, confidential guests |
| [Homed, users, and sessions](references/homed-users-and-sessions.md) | PAM, logind, inhibitors, sleep, homed migration, user records, quotas, run0, capsules |
## Migration checks
### Removed interfaces and build switches
Replace `init 3` and dependencies on `runlevel3.target` with native target
operations such as `systemctl isolate multi-user.target`. Migrate init scripts
and `rc.local` jobs to native unit files before upgrading to v260. In v260,
`-Dcompat-sysv-interfaces=yes` installs restored numbered runlevel targets and
the `legacy.conf` tmpfiles rules; the packaged `rc-local.service` is gone.
V258 removes `org.freedesktop.systemd1.StartAuxiliaryScope()`; callers that
offload workers through it need to manage their lifetime through a separate unit.
V258 also removes support for the `SystemdOptions` EFI variable. Use system
credentials or configuration extensions for new deployments.
Replace `-Dbuild-executor-shared=single` with
`-Dsystemd-multicall-binary=true` and recreate build directories configured with
the old options. `-Dstandalone-binaries=` takes a comma-separated list of patterns.
Consult the build reference for the other removed switches and dependency requirements.
### Command arguments and transient unit compatibility
Since v258, `systemd-run --scope` expands command-line environment references
by default. Pass `--expand-environment=no` to preserve literal references.
`Exec*=` arguments can expand variables listed in `UnsetEnvironment=` before
those variables are removed from the child process environment.
`systemd-run --scope` rejects `--no-block` and `--ignore-failure`;
`--wait` rejects `--remain-after-exit`. JSON output is rejected for scopes,
trigger units, forwarded standard I/O, and verbose logging.
### Device ownership and access rules
V258 ignores non-system users and groups in udev `OWNER=` and `GROUP=` and
refuses them in networkd TUN/TAP `User=` and `Group=`. V260 accepts these
assignments again with deprecation warnings. Check rules with `udevadm verify`
or `udevadm test`.
Logind emits `change` events so udev can update device ACLs. Put rules assigning
`uaccess` in files with a numeric prefix below 73 and match every action except
removal. Udev builtin command names require exact matches. Clients of the old
udev control protocol must migrate to Varlink.
### Tmpfiles removal and configuration validation
Since v257, `systemd-tmpfiles --purge` requires at least one named configuration
file and acts only on entries marked with `$`. For example, put
`d$ /var/lib/demo 0750 root root -` in `demo.conf` and preview with
`systemd-tmpfiles --dry-run --purge ./demo.conf`.
Relative arguments such as `./app.conf` open directly; bare filenames use the
standard configuration search. A non-empty argument field on a `tmpfiles.d`
line type that does not consume it fails validation. `systemd-tmpfiles --clean`
honors the age field on `r` and `R` lines.
### Credential formats, null keys, and TPM enrollment
`systemd-creds cat` expects encrypted credentials in the same base64 format as
`decrypt` and `LoadCredentialEncrypted=`. New TPM-sealed credentials use the TPM
storage root key; older releases cannot read the new format, while v262 reads
both. Keep a compatible credential if the system must boot an older release.
Treat null-key credentials as unauthenticated plaintext. In v259,
`systemd-creds decrypt --refuse-null` rejects them even with Secure Boot off;
`--allow-null` explicitly accepts them. Without either switch, decryption
accepts null keys when UEFI Secure Boot is reported off.
With `systemd-creds encrypt --with-key=auto`, TPM2 sealing failure alone no
longer prevents encryption. Select an explicit TPM2 key mode when sealing is
required. New TPM enrollments default to an empty PCR mask; use a managed
`systemd-pcrlock` policy when enrollment must depend on PCR 7.
### NvPCR initialization and UKI tooling
Ship every `/usr/lib/nvpcr/*.nvpcr` definition in the UKI and build it with
`ukify --sign-initrd-pcrs` to embed a signed PCR policy for the `initrd` phase
with that policy reference. The initial extend must take place in the initrd,
so runtime lazy initialization can fail. Existing NvPCRs are upgraded
automatically and their old anchor secrets are removed.
When building a UKI with the v258 stub, use ukify v257.9, v258, or later.
Initrd system units default to disabled when no preset rule matches; image
builders should supply explicit presets for units that should be enabled there.
### Journal storage and automation output
Journald defaults to `Storage=persistent`. Set `Storage=auto` or build with
`-Djournal-storage-default=auto` to retain selection based on `/var/log/journal`.
`journalctl --fields`, `journalctl -F FIELD`, and `journalctl --field=FIELD`
reject entry filters. For filtered field values, query the matching entries
and extract the field from those results.
With `ukify inspect --json=`, repeated PE sections are arrays and per-profile
sections appear in `_profiles`. Extension status JSON always uses an array
for `extensions`, including `[]` for an unmerged hierarchy. Sysupdate feature
descriptions use `id` and an array of `documentation` strings.
### Mapped containers and pinned portable images
In `.nspawn` files, `PrivateUsers=pick` and `PrivateUsers=managed` default to
`PrivateUsersOwnership=auto`. Set `PrivateUsersOwnership=chown` or
`PrivateUsersOwnership=off` explicitly to retain the previous respective behavior.
Portabled generates an image policy and pins the image at attachment; reattach
the service to switch the image.
## Common configuration and integration tasks
### Reload services and spread retries
A `Type=notify-reload` service must catch or block `ReloadSignal=` before
sending `READY=1`; otherwise default signal handling causes a startup protocol
error. `RefreshOnReload=yes` refreshes extensions and credentials on reload,
and `ExecReloadPost=` runs commands once configuration reload has completed.
`RestartMode=debug` with `Restart=on-failure` retries failed invocations with
`DEBUG_INVOCATION=1` and temporary `LogLevelMax=debug`.
`RestartRandomizedDelaySec=` adds a uniformly distributed delay on top of
`RestartSec=` and any exponential backoff.
### Limit concurrency and isolate service resources
`ConcurrencySoftMax=` queues excess start jobs; `ConcurrencyHardMax=` fails
jobs above the hard limit. `ActivatingConcurrencyMax=4` permits four units in
a slice hierarchy to be activating at once, starting queued activations as
slots become free.
`PrivateUsers=managed` acquires a transient range of 65,536 UIDs and GIDs from
nsresourced. `PrivateTmp=disconnected` provides `/tmp` and `/var/tmp` from a
separate tmpfs. With `PrivateTmp=yes` and `DefaultDependencies=no`, a unit
without an explicit requirement for `/tmp` gets a disconnected `/tmp`; its
private `/var/tmp` mount is omitted without explicit ordering for `/var`.
### Configure forwarding and reload network state
Replace `IPForward=` with `IPv4Forwarding=` and `IPv6Forwarding=`. Set global
forwarding in `networkd.conf` and per-link forwarding in `.network` files.
`IPv6SendRA=` and `IPMasquerade=` imply per-link forwarding, so enable the
required global settings explicitly when migrating a router.
With valid `[BridgeVLAN]` configuration, networkd removes VLAN IDs absent from
that configuration. Include manually provisioned VLANs that must survive.
`networkctl reload --no-reconfigure` reads `.network` and `.netdev` files
without reconfiguring links and requires `io.systemd.Network.Reload()` with
support for `{"reconfigureLinks": false}`.
### Supply credentials and boot images
Use `systemd-creds encrypt --user input.txt secret.cred` for a user-scoped
credential; `--uid=` targets a specific user. Sandboxed units using
`PrivateDevices=`, `DevicePolicy=`, or `DeviceAllow=` decrypt through
`systemd-creds.socket`. User services can load encrypted credentials,
including TPM-backed credentials.
`bootctl link-auto` links UKIs and resources discovered in
`/usr/lib/systemd/uki/` and corresponding locations under `/run/` and `/var/`.
An `/etc/fstab` mount at or below `/boot` or `/efi` suppresses ESP and XBOOTLDR
mount unit generation by `systemd-gpt-auto-generator`.
### Build images and apply updates
`importctl pull-oci` stores an OCI image as an MStack. Units can use
`RootMStack=/srv/example.mstack`, and nspawn accepts
`--mstack=/srv/example.mstack`. Repart can combine `Encrypt=` and `Verity=data`
on one partition, building dm-verity over the LUKS2 ciphertext.
Invoke `systemd-sysupdate` from `libexecdir`. Its periodic units are
`systemd-sysupdate-update.service` and `.timer`, with aliases for the old names.
The `systemd-sysupdated` D-Bus API remains experimental and is expected to be
removed in v263. `systemd-sysupdate acquire` downloads ahead of installation;
`systemd-sysupdate cleanup` removes tracked files whose paths no longer match
the current definitions. Check changed or retired patterns before cleanup.
### Inspect sessions and collect diagnostics
Strong `block` inhibitors apply even to root or the lock holder. Use
`--check-inhibitors=no` for an explicit privileged override, or
`systemd-inhibit --mode=block-weak COMMAND` for the older caller exemptions.
Logind ends a session when its leader exits; keeping the descriptor from
`CreateSession()` open no longer extends its lifetime.
Use `journalctl -u demo.service -I` for the latest service invocation.
`journalctl --follow --synchronize-on-exit=yes` prints entries submitted before
Ctrl-C before exiting. `systemd-report` collects combined JSON from report
Varlink sockets; its schema is experimental. Tools with `--help` also accept
`--introspect-cli` for verbs and options in JSON; that schema is experimental.