CHROOT(1)
π¦ chroot(1) β bestie, you're literally about to change your root π¦
okay so this page lives in the General Commands Manual, and it's the cutest little tool for saying "hey, pretend this directory is / now." It's giving main character energy for containers, chroots, rescue missions, and general chaos. Let's go π
π NAME
chroot β Run COMMAND with root directory set to NEWROOT.
β¨ SYNOPSIS β¨
chroot [OPTION]... NEWROOT [COMMAND [ARG]...]
π DESCRIPTION π
Run COMMAND with root directory set to NEWROOT.
That's it. That's the whole vibe. You hand it a directory, you hand it a command, and that command wakes up believing NEWROOT is /. no cap π
π OPTIONS π
--groups <GROUP1,GROUP2...>β a comma-separated list of groups you wanna switch to. so like, pick your squad, separated by commas π«Ά--userspec <USER:GROUP>β colon-separated user and group to switch to. user first, then the colon, then the group. that's the whole format, don't fight it π--skip-chdirβ use this one when you do not want the working directory to change to/after the root directory changes tonewroot, i.e., inside the chroot. like, stay where you are, periodt π-h,--helpβ Print help. your bestie always tells you what's up β¨-V,--versionβ Print version. show me the receipts π
π VERSION π
v(uutils coreutils) 0.12.0
yes the v( is really there, I'm not fixing it, that's just how it is π
π EXAMPLES π
Run $SHELL in the new root directory:
sudo chroot path/to/new_root
Run command as new root directory:
sudo chroot path/to/new_root command
Use a specific user and group:
sudo chroot --userspec username_or_id:group_name_or_id path/to/new_root
π heads up bestie: these examples are provided by the tldr-pages project at https://tldr.sh under the CC BY 4.0 License. And please note that, as uutils is a work in progress, some examples might fail. not me warning you in advance π«Ά
okay that's the whole page, you ate it, no crumbs left π this was CHROOT(1) from the General Commands Manual, sit tight for version v(uutils coreutils) 0.12.0, and this cutie was dated 2026-09-25. slay, go chroot something πΈ
π¦ where this page comes from
- ubuntu stonking: rust-coreutils 0.12.0-1ubuntu2 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms