You can hardly mention the
sudo command without recalling the hilarious XKCD strip about making sandwiches. It does seem like
sudo is the magic power to make a Linux system do what you want. The only problem is that those superpowers are not something to be taken lightly.
If you are surfing the web, for example, you really don’t want to be root, because if someone naughty takes over your computer they could do a lot more harm with your root password. But still, there are times when you want to run certain commands that are normally root-only and don’t want to bother with a password. Luckily,
sudo can handle that use case very easily.
As a simple example, suppose you like to shut your computer down at the end of the day. You run the shutdown command from the terminal but it doesn’t work because you aren’t root. You then have to do it again with
sudo and if you haven’t logged in lately, provide your password. Ugh.