The Schworak Site | Log In | Up A Level

1. Executable programs or shell commands

Enter a Linux command to search for:

ISCHROOT

Section: User Commands (1)
Updated: 30 May 2011
Index  |  Return to Main Contents
 

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.


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
BUGS

Return to Main Contents

All content on this site is copyright ©2004-2024 and is not to be reproduced without prior permission.