CHROOT(8)

๐Ÿ’– CHROOT โ€” the chroot(8) glow-up ๐Ÿ’–

okay bestie, sit down, hydrate, because we're talking about chroot, a User Commands classic. She's giving "run a command or an interactive shell, but inside a special root directory" and honestly? she ate. ๐Ÿ‘‘


โœจ NAME โœจ

chroot โ€” run a command, or an interactive shell, with a special root directory. yes that's the whole name section, she's concise, she's iconic, periodt. ๐ŸŽ€


๐ŸŒธ SYNOPSIS ๐ŸŒธ

chroot [OPTION] NEWROOT [COMMAND [ARG]...]
chroot OPTION

two moods, two lines. pick your fighter. ๐Ÿ’…


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

So basically: you run COMMAND with the root directory set to NEWROOT. that's it, that's the whole vibe. ๐ŸŒˆ

And here are the flags, and bestie, I need you to know every single one of them, no skipping, no skimming, this is a no-skim zone:

  • --groups=G_LIST โ€” specify supplementary groups as g1,g2,..,gN โœจ
  • --userspec=USER:GROUP โ€” specify the user and group (either an ID or a name, dealer's choice) to use ๐Ÿ’ซ
  • --skip-chdir โ€” do not change the working directory to / ๐Ÿ™ˆ
  • --help โ€” display this help and exit ๐Ÿซถ
  • --version โ€” output version information and exit โญ

And the little detail that changes everything: if no command is given, it runs '"$SHELL" -i' (default: /bin/sh -i). so it just hands you a lil interactive shell like a gift. ๐ŸŽ

๐Ÿ’€ Exit status: ๐Ÿ’€

the numbers are not a suggestion, they are a mood ring, here's the key:

  • 125 โ€” if the chroot command itself fails ๐Ÿ’€
  • 126 โ€” if COMMAND is found but cannot be invoked ๐Ÿ˜ญ
  • 127 โ€” if COMMAND cannot be found ๐Ÿ™ˆ
  • - โ€” the exit status of COMMAND otherwise โœจ

๐Ÿ’œ AUTHOR ๐Ÿ’œ

Written by Roland McGrath. legend behaviour, honestly. ๐Ÿ‘‘


๐Ÿ“ REPORTING BUGS ๐Ÿ“

Found something cursed? GNU coreutils online help: <https://www.gnu.org/software/coreutils/> ๐Ÿซถ

And hey โ€” report any translation bugs to <https://translationproject.org/team/> ๐ŸŒธ they wanna hear it fr fr.


๐Ÿงš SEE ALSO ๐Ÿงš

the lore continues in chroot(2) ๐Ÿ’…

Packaged by Debian (9.7-3) ๐ŸŽ€

Copyright ยฉ 2025 Free Software Foundation, Inc. ๐Ÿ’–

License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. ๐Ÿ“œ

This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. no cap, no warranty, she said what she said. ๐Ÿ’€

and that's the whole page bestie, love that for us. this one's GNU coreutils 9.7, dropped June 2025, CHROOT(8) forever and always. mwah. ๐Ÿ’…๐Ÿ’–โœจ

๐Ÿ“ฆ where this page comes from