LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

run0

Run commands as another user via systemd

TLDR

Run command as root
$ run0 [command]
copy
Run as specific user
$ run0 -u [username] [command]
copy
Run as user and group
$ run0 -u [username] -g [group] [command]
copy

SYNOPSIS

run0 [-u|--user user] [-g|--group group] [command]

DESCRIPTION

run0 elevates privileges without being a SUID binary. Unlike sudo, it authenticates via polkit and spawns commands through a systemd service, providing better security isolation.The tool is designed as a more secure alternative to sudo, avoiding the security concerns of SUID binaries while maintaining familiar privilege escalation semantics.

PARAMETERS

-u, --user _user_

Run as specified user
-g, --group _group_
Run with specified group
--no-ask-password
Don't prompt for password
--machine _machine_
Execute on container/VM
-D, --chdir _path_
Change working directory before running
--setenv _NAME=VALUE_
Set environment variable for the invoked process
--background _color_
Change terminal background tint (set to empty to disable)
--nice _N_
Run command with adjusted scheduling priority

INSTALL

sudo apt install systemd
copy
sudo dnf install systemd
copy
sudo pacman -S systemd
copy
sudo zypper install systemd
copy
brew install systemd
copy
nix profile install nixpkgs#systemd
copy

CAVEATS

Requires systemd 256+. Authentication through polkit. Environment handling differs from sudo. Some sudo features not available.

HISTORY

run0 was introduced in systemd 256 by Lennart Poettering as a secure alternative to sudo. It addresses SUID-related security concerns by using polkit for authentication and service-based command execution.

SEE ALSO

sudo(8), pkexec(1), doas(1), systemd-run(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid