is-root
TypeScript icon, indicating that this package has built-in type declarations

3.0.0 • Public • Published

is-root

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
import isRoot from 'is-root';

isRoot();
//=> true

Related

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

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
3.0.01,059latest

Version History

VersionDownloads (Last 7 Days)Published
3.0.01,059
2.1.03,943,670
2.0.069,985
1.0.0327,156
0.1.0249

Package Sidebar

Install

npm i is-root

Weekly Downloads

3,577,945

Version

3.0.0

License

MIT

Unpacked Size

2.59 kB

Total Files

5

Last publish

Collaborators

  • sindresorhus