systemd/run0 - ArchWiki

Jump to content

# systemd/run0

From ArchWiki
< Systemd

Related articles

- Users and groups
- sudo
- doas

run0 is a privilege elevation tool introduced with systemd v256. It is implemented as an alternative invocation mode of systemd-run(1) and is intended as a modern replacement for sudo, without relying on SUID binaries. It uses polkit for authentication.

## Installation

run0 is installed with systemd.

Install polkit, as it is required to handle authorization.

Tip You can add your user to the wheel group to authenticate as your own user.

## Usage

To use run0, simply prefix a command and its arguments with `run0` and a space:

    $ run0 cmd

For example, to use pacman:

    $ run0 pacman -Syu

To launch an interactive shell (similar to `sudo -i`), just type `run0`.

With the `--empower` option, privileged commands are run as the current user, avoiding a full root context. This is useful to run a command with privileges but still have all created files and directories be owned by your current user.

Options for `systemd-run` also apply. See systemd-run(1) and run0(1).

## See also

https://mastodon.social/@pid_eins/112353324518585654

Categories:

- Security
- Commands

systemd/run0
Add topic