by eliaspro · 3y ago · 0 comments
This doesn't carry the risk of tainting the new session with the context of the initiating shell (pwd, env, ...) and doesn't only feel like a full login, but actually provides everything that's part of a login session (systemd and DBus user-sessions, shared session context with other shells of the same user, etc).
sudo su -
Which also resets your environment and everything.But that only works if theres a password on root, which is generally seen as ill advised. But was how every distro did it in the olden days before there was a sudo group.
$sudo apt-get install -y systemd-container
to get machinectl