{
    "mode": "man",
    "parameter": "ischroot",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/ischroot/1/json",
    "generated": "2026-07-27T18:54:13Z",
    "synopsis": "ischroot [--default-false] [--default-true] [--help] [--version]",
    "sections": {
        "NAME": {
            "content": "ischroot - detect if running in a chroot\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "ischroot [--default-false] [--default-true] [--help] [--version]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "ischroot detects if it is currently running in a chroot.  The exit status is:\n\n0      if currently running in a chroot\n\n1      if currently not running in a chroot\n\n2      if  the  detection is not possible (On GNU/Linux this happens if the script is not run\nas root).\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-f, --default-false",
                    "content": "Exit with status 1 if the detection is not possible.\n",
                    "flag": "-f",
                    "long": "--default-false"
                },
                {
                    "name": "-t, --default-true",
                    "content": "Exit with status 0 if the detection is not possible.\n\n--help Print a usage message on standard output and exit successfully.\n",
                    "flag": "-t",
                    "long": "--default-true"
                },
                {
                    "name": "--version",
                    "content": "Print version information on standard output and exit successfully.\n",
                    "long": "--version"
                }
            ]
        },
        "BUGS": {
            "content": "On GNU/Linux, chroot detection is not possible  when  not  root.   This  works  correctly  on\nGNU/Hurd and GNU/kFreeBSD.\n\n\n\nDebian                                       30 May 2011                                 ISCHROOT(1)",
            "subsections": []
        }
    },
    "summary": "ischroot - detect if running in a chroot",
    "flags": [
        {
            "flag": "-f",
            "long": "--default-false",
            "arg": null,
            "description": "Exit with status 1 if the detection is not possible."
        },
        {
            "flag": "-t",
            "long": "--default-true",
            "arg": null,
            "description": "Exit with status 0 if the detection is not possible. --help Print a usage message on standard output and exit successfully."
        },
        {
            "flag": "",
            "long": "--version",
            "arg": null,
            "description": "Print version information on standard output and exit successfully."
        }
    ],
    "examples": [],
    "see_also": []
}