Need private packages and team management tools?Check out npm Teams »

is-root

2.1.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

4,093,249

Version

2.1.0

License

MIT

Unpacked Size

2.68 kB

Total Files

5

Last publish

Collaborators

  • avatar