man > ischroot(1)

ISCHROOT(1)                            General Commands Manual                           ISCHROOT(1)



NAME
       ischroot - detect if running in a chroot

SYNOPSIS
       ischroot [--default-false] [--default-true] [--help] [--version]

DESCRIPTION
       ischroot detects if it is currently running in a chroot.  The exit status is:

       0      if currently running in a chroot

       1      if currently not running in a chroot

       2      if  the  detection is not possible (On GNU/Linux this happens if the script is not run
              as root).

OPTIONS
       -f, --default-false
              Exit with status 1 if the detection is not possible.

       -t, --default-true
              Exit with status 0 if the detection is not possible.

       --help Print a usage message on standard output and exit successfully.

       --version
              Print version information on standard output and exit successfully.

BUGS
       On GNU/Linux, chroot detection is not possible  when  not  root.   This  works  correctly  on
       GNU/Hurd and GNU/kFreeBSD.



Debian                                       30 May 2011                                 ISCHROOT(1)

Generated by phpman v4.9.26-1-g511901d · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-27 09:38 @216.73.216.194
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!