systemctl-bind
Bind-mount paths into unit namespaces
TLDR
Bind-mount path into unit
SYNOPSIS
systemctl bind UNIT PATH [PATH]
DESCRIPTION
systemctl bind ephemerally bind-mounts a file or directory from the host into a running unit's mount namespace. This allows injecting files into sandboxed services without modifying their unit configuration.
If only one path is specified, the mount appears at the same location inside the unit. If two paths are given, the source is mounted at the destination inside the unit.
PARAMETERS
--read-only
Mount the path as read-only inside the unit--mkdir
Create the destination directory if it doesn't exist
CAVEATS
Requires the unit to have a separate mount namespace (PrivateMounts=yes or similar). Binds are ephemeral and don't persist across unit restarts. The unit must be running.
HISTORY
The bind subcommand was added to systemctl for runtime injection of files into isolated services. It complements systemd's sandboxing features like PrivateMounts and ProtectSystem.
SEE ALSO
systemctl(1), systemd.exec(5)
