Linux users and root
Your everyday Linux user, sudo and its password, root, and the extra 'msl' user.
On this page 6 sections
Your default user#
The first interactive shell on a distro asks you to create a user — see Your first start. That user becomes the default login for the distro: every shell, in the app or out of it, logs in as them.
It belongs to the distro, not the instance, because instances of a distro share one disk. Set it up once on any Debian instance, and every Debian instance has it.
sudo#
Your account is an administrator, the usual Linux way: it's in the distro's admin group — sudo on Debian, Ubuntu, Kali and Nix, wheel on the rest — and sudo asks for its password:
sudo apt install gimp
[sudo] password for abi:After that, sudo remembers you for a few minutes, so a run of commands only asks once.
Root#
From the Mac, -u picks the user — and -u root needs no password, because the Mac is the machine's owner. It's the same escape hatch WSL has with wsl -u root:
msl work -u root
msl work -u root apk add htopForgot your password?#
Set a new one as root, from the Mac:
msl work -u root passwd abiReplace abi with your username. It asks for the new password twice.
One-off commands#
msl work <command> runs as the default user too, once there is one — before that, as root.
The msl user#
Every distro also has an ordinary unprivileged user called msl, for when you want a clean account with no admin rights: msl work -u msl.