CHROOTUID(1)
β¨ chrootuid β run command in restricted environment β¨
okay bestie, buckle up π this is chrootuid, from section 1 of the General Commands Manual, and it's literally the girl who locks the door behind you and hands you a fake ID. she builds a whole tiny world for a command to live in. no cap.
πΈ SYNOPSIS πΈ
chrootuid [-i] newroot newuser command...
π¦ DESCRIPTION π¦
so here's the vibe: chrootuid sets up a restricted environment for executing command. that's the whole main character move.
- Access to the file system is restricted to the
newrootsubtree β like, you do not get to peek outside, bestie, that door is closed π - Privileges are restricted to those of the
newuseraccount, which must be a known account in the unrestricted environment (iykyk β she has to exist in the real world first before she can move into the tiny house) - The initial working directory is changed to
newroot
the way she does this is so smart actually β chrootuid combines chroot(8) and su(1) into one single program, so that there is no need to have commands such as /usr/bin/su sitting around inside the restricted environment. like, the tiny world doesn't need a whole su binary, she brought her own π
iconic behavior fr fr.
β οΈ Only the superuser can use the chrootuid command. not you. not me. root only, periodt. π
π OPTIONS π
okay so there is literally only one option and she ate:
-iβ makes it run in interactive mode β¨ Errors get printed onstderrinstead of throughsyslog, and the exit status will be1if there are any errors.
that's it. one option. she's minimal. she's focused. she's not doing too much. π«Ά
π RETURN CODES π
two moods, bestie:
- When running in daemon mode (the default), the exit status of
chrootuidis always0. always. no matter what. she's unbothered. - When running in interactive mode, it will exit with an exit status of
1if there is any error in its invocation. otherwise, the exit status is the exit status ofcommandβ so the command's own result is what you get back.
π DIAGNOSTICS π
where do the problems go? depends on the mode, bestie:
- daemon mode β problems are reported to the
syslogdaemon - interactive mode β errors are reported on
stderr
same tea, different cup π
β SEE ALSO β
go read those too, they're the ancestors, the blueprint, the lore π
π AUTHOR(S) π
- Wietse Venema
- Eindhoven University of Technology
- Department of Mathematics and Computer Science
- Den Dolech 2, P.O. Box 513, 5600 MB Eindhoven, The Netherlands
- IBM T.J. Watson Research
- P.O. Box 704
- Yorktown Heights, NY 10598, USA
π§ CREATION DATE π§
Tue Oct 13 11:37:29 MET 1992
a legend was born in 1992 and she's still serving π
π¦ LAST MODIFICATION π¦
Mon May 20 22:49:02 CEST 2007
π« VERSION/RELEASE π«
1.3
and that's the whole page, bestie π
big thank you to Wietse Venema for writing her, shoutout to the General Commands Manual for hosting, and a lil kiss to the 1.3 release β created back on Tue Oct 13 11:37:29 MET 1992, last touched up on Mon May 20 22:49:02 CEST 2007. slay, stay chrooted, stay safe πβ¨π
π¦ where this page comes from
- debian bookworm: chrootuid 1.3-6.1
- debian trixie: chrootuid 1.3-6.2
- ubuntu jammy: chrootuid 1.3-6build1
- ubuntu noble: chrootuid 1.3-6.2
- ubuntu resolute: chrootuid 1.3-6.2build1
- ubuntu stonking: chrootuid 1.3-6.2build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms