--root, --prefix and --socket. These pages write nsbx, which is
what a global install gives you; npx nativesandbox works identically in every example below.
Getting the command
npm install nativesandbox does not put nsbx on your shell’s PATH. npm links a package’s
binaries into node_modules/.bin, which is on PATH inside npm scripts and npx — not in your
terminal. Three ways to run it:
Under nvm, a global install lands in the current Node version’s directory — switch
versions and
nsbx is gone until you install it there too. npx nativesandbox sidesteps
that, at the cost of a slower first run.package.json script needs no prefix at all, because npm puts
node_modules/.bin on PATH for scripts:
run
exec
run does. Use it with a sandbox
your application created, or one run --keep --name left behind.
ls
IDLE and MAX LIFE are read off each container, not from this process — so they are what that
sandbox will actually be reclaimed by, even if another process created it.
Only sandboxes with the matching prefix are listed. A container this package did not create is
never shown and never touched.
rm
stop semantics from the
library if you want the cache kept.
Removing something that is already gone is reported, not an error.