Why Not Always Root?
Least privilege.
If root can do anything, why not just log in as root, and never be bothered by permission denied again? It's tempting. But it's one of the worst habits you can have.

- Why not just be root?
- No more permission denied
- A very bad habit
Why root is risky
As root, a single typo can wipe the system, and nothing will stop you. Any program you run also gets root's power, including a bad one you downloaded by mistake. And on a shared server, you lose the record of who did what. Permission denied is often Linux saving you from yourself.
Two ways to work
The safe way has a name, least privilege. Work as a normal user, with just enough power for everyday jobs. And use sudo for the few moments you really need more. On many servers, logging in directly as root is switched off completely.
Always root
- Every command is dangerous
- Mistakes are fatal
- No audit trail
Normal user + sudo
- Safe by default
- Power only when asked
- Every sudo is logged
If you really need a root shell
Sometimes you have many admin commands to run in a row. Sudo dash I opens a root shell. The prompt changes to a hash sign, to warn you. Do the work, then type exit straight away, to go back to being yourself.
| key | value |
|---|---|
| sudo -i | open a root shell |
| # prompt | you are root now |
| exit | back to your user |
| Keep it short | leave as soon as you can |
Summary
Work as a normal user, and use sudo only when needed. That's least privilege. If you open a root shell, leave it quickly. Next, adding new users.
Key takeaways- Least privilege
- sudo when needed
- sudo -i, then exit