Adding yourself to a linux user group without restarting your session

I recently ran into an issue where I wanted to add myself to a new group (hmbprototype) on my server cluster, but really didn’t want to kill all my processes and restart my session to apply the new group settings.

A bit of searching around lead me to this:

$ newgrp hmbprototype

Seems to have added that group to my list of groups for my current session! :D Obviously, you actually need to create the group and add yourself to it before using newgrp. :P

Before using this yourself, I recommend you look at the man page first ofc :)

$ man newgrp