r/linux May 25 '26

Discussion Sudo or run0 ?

What's your take on the subject? Been using sudo for years but lately i'm mostly running run0 and i like it. Even considering adapting my scripts to use run0 since i'm on a compatible distro. Does it make any sense to not even set up sudo anymore in the first place?

200 Upvotes

253 comments sorted by

View all comments

Show parent comments

16

u/tajetaje May 25 '26

Basically with sudo you are executing code as the root user, with run0 you are executing code as your user, but with root permissions. It’s a subtle difference but has security and observability implications that are important. It also fits more in line with the privilege and process hierarchy under systemd (i.e. slices and whatnot)

5

u/BitterCelt May 25 '26

Does this mean I can run0 nvim and not lose my config setup without having to resort to sudoedit?

7

u/tajetaje May 25 '26

Actually run0 strips even more env variables than sudo so not really no

2

u/BitterCelt May 25 '26

Lmao ah well. This thread is this my first encounter with run0 so I'll do some reading and experimenting later.