You don't need sudo
This whole time as a Linux user I’d been conditioned to believe that I needed sudo to get things done. Whenever I installed Alpine Linux or Arch Linux, one of the first packages I always installed and configured was sudo (or doas, a small sudo replacement).
One day, when I was reinstalling Linux and choosing which packages to install, I realized that I didn’t actually need sudo.
Why you don’t need sudo
Instead of using sudo to execute commands, you can simply use su
. It prompts you for your root password (do you remember yours?) and then spawns a shell where you can execute commands as root.
I like this approach for a few reasons. First of all, it requires you to know your root password, which I think is good practice. Second of all, it creates a clean separation of permissions between your personal account (which does not have privileged access) and the root account (which has dangerous privileges). When you need to spawn a root shell with su
, you are reminded that what you are doing is dangerous.
sudo is still useful in contexts where multiple users need privileged access to the same system. But for your personal computer? You could probably do without it.