Linux and Unix newgrp command

Quick links

About newgrp
Syntax
Examples
Related commands
Linux and Unix main page

About newgrp

Log into a new group.

Syntax

newgrp [ -| -l ] [ group ] [argument]

- | -lChange the environment to what would be expected if the user actually logged in again as a member of the new group.
groupA group name from the group database or a non negative numeric group ID. Specifies the group ID to which the real and effective group IDs will be set. If group is a non-negative numeric string and exists in the group database as a group name, the numeric group ID associated with that group name will be used as the group ID.
argumentsh and ksh only. Options and operand of the newgrp command.

Examples

newgrp

Return you to a prompt of a new shell.

Related commands

ksh
login
set
sh