Users and sudo
This page needs a recent browser (with SharedArrayBuffer support). Please update Chrome, Edge, Firefox or Safari to the latest version.
Many users, one computer
- Linux was built for many people to share one machine safely.
- Each person has a user account.
whoamitells you who you currently are:
whoami
- Your files are yours; other users cannot read or change them unless you allow it.
The superuser: root
- One special user, root, can do anything — change any file, install software, manage other users.
- With great power comes great danger: a wrong command as root can break the whole system.
- So you normally work as an ordinary user, and only become root when you must.
sudo — borrow root for one command
sudoruns a single command as root (it asks for your password first):
sudo apt install git
- Think of it as "do this super-user do". Use it only when a task truly needs admin rights — and read the command twice before you press Enter.
Print the name of the user you are logged in as, with whoami.
Click Run to see the output here.