---
name: "newgrp"
section: "1"
platform: "macos"
package: "system_cmds"
version: "1042.120.1"
release: "macOS 26.5"
platforms: ["linux", "freebsd", "macos"]
url: "https://new.carta.tech/newgrp"
---

# newgrp(1)

change to a new group

## NAME

**newgrp** – change to a new group

## SYNOPSIS

**newgrp** \[**-l**\] \[*group*\]

## DESCRIPTION

The **newgrp** utility creates a new shell execution environment with modified real and effective group IDs.

The options are as follows:

- **-l**

  Simulate a full login. The environment and umask are set to what would be expected if the user actually logged in again.

If the *group* operand is present, a new shell is started with the specified effective and real group IDs. The user will be prompted for a password if they are not a member of the specified group.

Otherwise, the real, effective and supplementary group IDs are restored to those from the current user's password database entry.

## EXIT STATUS

The **newgrp** utility attempts to start the shell regardless of whether group IDs were successfully changed.

If an error occurs and the shell cannot be started, **newgrp** exits \>0. Otherwise, the exit status of **newgrp** is the exit status of the shell.

## SEE ALSO

[csh(1)](/csh/1.md), [groups(1)](/groups/1.md), [login(1)](/login/1.md), [sh(1)](/sh/1.md), [su(1)](/su/1.md), [umask(1)](/umask/1.md), [group(5)](/group/5.md), [passwd(5)](/passwd/5.md), [environ(7)](/environ/7.md)

## STANDARDS

The **newgrp** utility conforms to IEEE Std 1003.1-2001 (“POSIX.1”).

## HISTORY

A **newgrp** utility appeared in Version 6 AT&T UNIX.

## BUGS

Group passwords are inherently insecure as there is no way to stop users obtaining the password hash from the group database. Their use is discouraged. Instead, users should simply be added to the necessary groups.
