newgrp1
Log in to a new group
Usage
newgrp [group
[command]]
newgrp [-c
command]
[group]
Overview
newgrp changes the group identification of its caller, analogously to login(1). The same person remains logged in, and the current directory is unchanged, but calculations of access permissions to files are performed with respect to the new group ID.
If no group is specified, the GID is changed to the login GID.
An optional command can be specified, which is invoked after group change instead of the user’s shell.
Options
-
-c, --command=command -
Pass command to the user’s shell with the
-coption.
-
-h, --help -
Display help text and exit.
-
-V, --version -
Display version and exit.
Files
/etc/group, /etc/passwd
Releases
19 releases since Debian 1.1 (Buzz); the text changed 16 times.
--command since Debian 13 (Trixie);
--help since Debian 13 (Trixie);
--version since Debian 13 (Trixie);
-V since Debian 13 (Trixie);
-c since Debian 13 (Trixie);
-h since Debian 13 (Trixie).