{
    "mode": "man",
    "parameter": "CHROOT",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/CHROOT/8/json",
    "generated": "2026-10-22T12:38:23Z",
    "synopsis": "chroot [OPTION] NEWROOT [COMMAND [ARG]...]\nchroot OPTION",
    "sections": {
        "NAME": {
            "content": "chroot - run command or interactive shell with special root directory\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "chroot [OPTION] NEWROOT [COMMAND [ARG]...]\nchroot OPTION\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Run COMMAND with root directory set to NEWROOT.\n\n--groups=GLIST\nspecify supplementary groups as g1,g2,..,gN\n\n--userspec=USER:GROUP\nspecify user and group (ID or name) to use\n",
            "subsections": [
                {
                    "name": "--skip-chdir",
                    "content": "do not change working directory to '/'\n\n--help display this help and exit\n",
                    "long": "--skip-chdir"
                },
                {
                    "name": "--version",
                    "content": "output version information and exit\n\nIf no command is given, run '\"$SHELL\" -i' (default: '/bin/sh -i').\n",
                    "long": "--version"
                },
                {
                    "name": "Exit status:",
                    "content": "125    if the chroot command itself fails\n\n126    if COMMAND is found but cannot be invoked\n\n127    if COMMAND cannot be found\n\n-      the exit status of COMMAND otherwise\n"
                }
            ]
        },
        "AUTHOR": {
            "content": "Written by Roland McGrath.\n",
            "subsections": []
        },
        "REPORTING BUGS": {
            "content": "GNU coreutils online help: <https://www.gnu.org/software/coreutils/>\nReport any translation bugs to <https://translationproject.org/team/>\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Copyright  ©  2023 Free Software Foundation, Inc.  License GPLv3+: GNU GPL version 3 or later\n<https://gnu.org/licenses/gpl.html>.\nThis is free software: you are free to change and redistribute it.  There is NO WARRANTY,  to\nthe extent permitted by law.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "chroot(2)\n\nFull documentation <https://www.gnu.org/software/coreutils/chroot>\nor available locally via: info '(coreutils) chroot invocation'\n\nGNU coreutils 9.4                           January 2026                                   CHROOT(8)",
            "subsections": []
        }
    },
    "summary": "chroot - run command or interactive shell with special root directory",
    "flags": [
        {
            "flag": "",
            "long": "--skip-chdir",
            "arg": null,
            "description": "do not change working directory to '/' --help display this help and exit"
        },
        {
            "flag": "",
            "long": "--version",
            "arg": null,
            "description": "output version information and exit If no command is given, run '\"$SHELL\" -i' (default: '/bin/sh -i')."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "chroot",
            "section": "2",
            "url": "https://www.chedong.com/phpMan.php/man/chroot/2/json"
        }
    ]
}