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

    is-rootpublic

    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

    573,113

    version

    2.0.0

    license

    MIT

    repository

    githubgithub

    last publish

    collaborators

    • avatar