Users
The newgrp command
Changes the effective group of the current session without logging out.
Syntax
newgrp grupoCopy-ready examples
$ sudo groupadd equipo && newgrp equipo && groupsSwitch the active groupYou can try them in the browser terminal: it does not touch your computer.
Typical mistakes
- It opens a subshell: to return to the previous group use exit.
FAQ
Why is usermod not enough?
Because new groups only apply at login; newgrp activates them immediately.
Learn to actually use it
The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.
Start the free course