Run0 as an alternative to sudo
run0 is an alternative for sudo that is available in systemd from version 256. run0 performs applications in a temporarily created systemd-run. The Set User-ID (SUID) is bypassed with that. run0 provides therefore a smaller attack vector than sudo.
Prerequisite
systemd version 256 or higher is required to use run0.[1]
In addition, the service polkitd must be installed and running.[2][3]
systemd 256
The following distributions fulfill these prerequisites (as of 27.10.2025):
- Fedora from version 41
- Debian 13
- Arch Linux
- Linux Mint DE 7
polkitd
This service should already be made available. If this is not the case, the service can be reinstalled.
Verification of installation
The following command can help for the verification:
user@debian:~$ apt list --installed polkit*
The output should at least display the polkitd service.
Installation
If the service is not yet installed, this must be done. For this, sudo can be used, if installed. Otherwise, the installation must be performed as root:
user@debian:~$ sudo apt install polkitd
or
root@debian:~# apt install polkitd
After successful installation, the service can be started:
user@debian:~$ sudo systemctl start polkit (Attention: without "d" at the end!)
Usage
After successful installation of the prerequisites, run0 can be used like sudo.
Example:
user@debian:~$ run0 whoami
Advantages compared to sudo
run0 offers several advantages over the sudo authorization package:
- authorization rights are only granted for the duration of the given command
- gets along without Set-User ID bit
- coloration of the terminal to display that enhanced rights are used
- no additional package necessary (polkit should be installed)
- uses systemd for performance
References
- ↑ run0(1) — Linux manual page (man7.org)
- ↑ run0: Error message should be more explicit when polkit is missing #33418 (github.com/systemd/systemd/issues)
- ↑ polkitd(8) — The polkit system daemon (polkit.pages.freedesktop.org)
More information
run0 as an alternative to sudo? (credativ.de, 27.10.2025)
|
Author: Stefan Bohn Stefan Bohn has been employed at Thomas-Krenn.AG since 2020. Originally based in PreSales as a consultant for IT solutions, he moved to Product Management in 2022. There he dedicates himself to knowledge transfer and also drives the Thomas-Krenn Wiki. |
|
Translator: Alina Ranzinger Alina has been working at Thomas-Krenn.AG since 2024. After her training as multilingual business assistant, she got her job as assistant of the Product Management and is responsible for the translation of texts and for the organisation of the department.
|


