CHROOT(1)

NAME
chroot - Run COMMAND with root directory set to NEWROOT.

SYNOPSIS
chroot [--groups] [--userspec] [--skip-chdir] [-h|--help] [-V|--version] <newroot> [command]

DESCRIPTION
Run COMMAND with root directory set to NEWROOT.

OPTIONS

--groups <GROUP1,GROUP2...>
    Comma-separated list of groups to switch to

--userspec <USER:GROUP>
    Colon-separated user and group to switch to.

--skip-chdir
    Use this option to not change the working directory to / after changing the root directory to newroot, i.e., inside the chroot.

-h, --help
    Print help

-V, --version
    Print version

EXTRA
## 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}} > The examples are provided by the [tldr-pages project](https://tldr.sh) under the [CC BY 4.0 License](https://github.com/tldr-pages/tldr/blob/main/LICENSE.md). > > Please note that, as uutils is a work in progress, some examples might fail.

VERSION
v(uutils coreutils) 0.9.0