Skip to main content

getegid

property Process.getegid

The process.getegid() method returns the numerical effective group identity of the Node.js process. (See getegid(2).)

import process from 'node:process';

if (process.getegid) {
  console.log(`Current gid: ${process.getegid()}`);
}

This function is only available on POSIX platforms (i.e. not Windows or Android).

() => number
Back to top