newgrp

Switch primary group membership. More information: <https://manned.org/newgrp>.

Install

All systems
curl cmd.cat/newgrp.sh
Debian Debian
apt-get install login
Ubuntu
apt-get install login
Alpine
apk add util-linux
Arch Arch Linux
pacman -S util-linux
image/svg+xml Kali Linux
apt-get install login
Fedora
dnf install shadow-utils-2
Windows (WSL2)
sudo apt-get update sudo apt-get install login
OS X
brew install util-linux
Raspbian
apt-get install login
Docker
docker run cmd.cat/newgrp newgrp powered by Commando

Switch primary group membership. More information: <https://manned.org/newgrp>.

  • Change user's primary group membership:
    newgrp group_name
  • Reset primary group membership to user's default group in `/etc/passwd`:
    newgrp

© tl;dr; authors and contributors