In a term (let's say a PuTTY session), I want to see my current shell bash replacing by a fresh new one, while refreshing the user's groups (among others).
I know that exec bash --login
replace current shell by a new one, reloading .bashrc
or .profile
files, but it does not reloading /etc/groups
. I suppose this command doesn't load all system configuration file (more details on that will be appreciated).
I know that su - username
do, but it creates another nested shell, not replacing the current one (and it ask for password). I don't want to type any password, nor have to exit
one more.
Is there a way to natively achieve this? => Replacing my current shell with a new one, in the exact same way as I log in in another term (s fresh session with reloading bash file, groups, and so.