scope unit
also: scope, .scope unit
A systemd unit that defines a lightweight container for processes without a service definition, typically used for organizing and managing ad-hoc groups of processes or system calls.
A scope unit is a type of systemd unit (with a .scope extension) that represents a collection of processes organized into a single cgroup without requiring a formal service definition. Unlike service units that are created from systemd unit files, scope units are typically created dynamically at runtime.
Scope units are commonly created when system calls like fork() occur outside of standard service management, allowing administrators to apply resource limits, ordering dependencies, and organizational structure to otherwise unmanaged processes. For example, the Linux kernel might create a scope unit to group all processes spawned by a user session or by the systemd-run command.
You can create a temporary scope using systemd-run --scope to run a command within a new scope unit, which ensures its resource usage is tracked and managed by systemd's cgroup hierarchy.