Skip to content

systemd

Utilities for reading systemd/OS configuration files.

Functions

os_release()

Returns a dict of key/value pairs from /etc/os-release.

Keys and values follow the os-release specification. Values are unquoted (shell quoting is stripped).

Example:

import systemd
let rel = systemd.os_release()
echo $rel["NAME"]   # e.g. "Fedora Linux"