Skip to content

Check whether the current process is running inside a chroot.

License

Notifications You must be signed in to change notification settings

oelin/is-chroot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

is-chroot

Check whether the current process is running inside a chroot. Currently only supports ext2, ext3 and ext4 file systems.

Installation

npm i is-chroot

Usage

import isChroot from 'is-chroot'

isChroot()

Behind the scenes isChroot() checks whether the inode of / is exactly 2. If this isn't the case and the file system is ext2, ext3 or ext4 then it's likely that the current process is running inside a chroot. Please note that this is only a heuristic and can be improved by considering additional factors.

About

Check whether the current process is running inside a chroot.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published