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 to newroot, 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