Chapter 12. Sudo Voodoo

Sudo is a handy little tool that is of value to both system administrators and common folks like us. What does it do? It allows you to temporarily assume the identity (and permissions) of another user, up to and including root. In fact, I have it on good authority that the name itself is short for superuser Do.

If you belong to the camp that says you should only have root privileges at the time they are needed, sudo makes your life a little easier by making it easier to shape-shift between the permissions for a mere mortal and those of the superuser.

We’ll start with an easy—and not uncommon—example. You need to make a change to a configuration file in order to take advantage of your latest hardware acquisition.

Let’s say ...

Get CLI for Noobies: A Primer on the Linux Command Line now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.