CHROOT(8)

πŸ“¦
version 9.10 Β· 5 versions
, in ubuntu stonking

πŸ’… chroot(8) πŸ’…

okay bestie, welcome to the chroot page β€” yes it's real Unix, yes it's the one from the CHROOT(8) manual, and yes we're gonna make it make sense. it runs a command (or drops you into an interactive shell) with a whole different root directory. cute, powerful, slightly unhinged. let's go πŸ¦‹


πŸ“› NAME

chroot β€” run command or interactive shell with special root directory

🌸 SYNOPSIS

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

✨ DESCRIPTION

the whole vibe: run COMMAND with the root directory set to NEWROOT. that's it. that's the function. your process wakes up and thinks / is somewhere else entirely. main character energy fr.

the flags you can pass:

  • --groups=G_LIST β€” specify supplementary groups as g1,g2,..,gN (yes, comma-separated, literally in that shape, like a lil playlist of groups)
  • --userspec=USER:GROUP β€” specify user and group (ID or name) to use β€” both, separated by a colon, you can't just pick one πŸ™ˆ
  • --skip-chdir β€” do not change working directory to '/'
  • --help β€” display this help and exit (the coward's path, but valid πŸ’…)
  • --version β€” output version information and exit

and if you give it no command at all? it runs '"$SHELL" -i' for you (default: '/bin/sh -i'). so it's giving interactive shell behavior by default, no notes.

πŸ’€ Exit status

pay attention bestie, these numbers matter:

  • 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
so like, if you see a 127 you probably typo'd something. not naming names. 🫢

πŸ‘‘ AUTHOR

Written by Roland McGrath. we stan a legend, no cap. ⭐

😭 REPORTING BUGS

found a bug? don't suffer in silence, tell the coreutils girlies:

🌈 SEE ALSO

Full documentation <https://www.gnu.org/software/coreutils/chroot> or available locally via: info '(coreutils) chroot invocation'

Packaged by Ubuntu (9.10-1ubuntu2) Copyright Β© 2026 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.


okay that's the whole page, you ate it, you understood it, you're basically a sysadmin now πŸŽ€

signing off from GNU coreutils 9.10, dated August 2026 β€” mwah, love u, go chroot responsibly πŸ’œ

πŸ“¦ where this page comes from