ISCHROOT(1)

๐Ÿ“ฆ
version 5.24 ยท 2 versions
, in debian trixie, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

๐Ÿ’– ischroot ๐Ÿ’–

โœจ NAME โœจ

okay so the whole point of this one is ischroot ๐Ÿงš, a tiny tool that detects if it is currently running in a chroot. that's it, that's the whole job ๐Ÿ’…

๐Ÿ‘‘ SYNOPSIS ๐Ÿ‘‘

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

๐ŸŒธ DESCRIPTION ๐ŸŒธ

bestie, ischroot literally checks whether you're running inside a chroot right now โœจ and then tells you the answer through its exit status ๐Ÿฆ‹ (the number it hands back when it's done). the exit status is:

  • 0 โ€” yesss, you're currently running in a chroot ๐Ÿ’œ
  • 1 โ€” nope, you're currently not running in a chroot ๐Ÿ™…โ€โ™€๏ธ
  • 2 โ€” the detection is not possible ๐Ÿ˜ญ

๐ŸŽ€ OPTIONS ๐ŸŽ€

  • -f, --default-false โ€” if the detection is not possible, exit with status 1 instead of 2 ๐Ÿ“
  • -t, --default-true โ€” if the detection is not possible, exit with status 0 instead of 2 ๐Ÿซถ
  • --help โ€” print a usage message on standard output and exit successfully ๐ŸŒˆ
  • --version โ€” print version information on standard output and exit successfully ๐Ÿ”ฅ

Source: Debian, dated 30 May 2011. ๐Ÿ’– That's the whole tea, bestie. Now go be iconic in your chroot (or not, no judgment) ๐Ÿฆ‹โœจ