Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

is-root

2.0.0 • Public • Published

is-root Build Status

Check if the process is running as root user, for example, one started with sudo

Install

$ npm install is-root

Usage

$ sudo node index.js
// index.js
const isRoot = require('is-root');
 
isRoot();
//=> true

Related

  • is-elevated - Check if the process is running with elevated privileges (cross-platform)

License

MIT © Sindre Sorhus

install

npm i is-root

Downloadsweekly downloads

877,216

version

2.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability