Skip to content

systemd

Utilities for reading systemd/OS configuration files.

Types

TypeDescription
OsRelease Parsed operating-system identification data with standard-aware projections.
ExtensionScope A system- or configuration-extension scope. An unrecognized scope is kept as written.
PortableScope A portable-service scope. An unrecognized scope is kept as written.
ReleaseType An operating system's release channel.

ExtensionScope = (:SYSTEM: | :INITRD: | :PORTABLE: | Str)

A system- or configuration-extension scope. An unrecognized scope is kept as written.

PortableScope = (:SYSTEM: | :USER: | :ANY: | Str)

A portable-service scope. An unrecognized scope is kept as written.

ReleaseType = (:STABLE: | :LTS: | :DEVELOPMENT: | :EXPERIMENT:)

An operating system's release channel.

Functions

os_release … -> OsRelease

Returns parsed OS-identification data from an os-release file.

Parameters

NameTypeDescription
:path? (Str | fs.Path) File to read. Defaults to /etc/os-release, falling back to /usr/lib/os-release as required by the os-release specification.