Many modern Linux systems assume that you will never have a root
shell. Instead, you are expected to prepend "sudo" to every root-type
command.
This is a safety measure, and I can appreciate that. But it seems
to give up a great deal of capability (for example, the ability to
scan down a file hierarchy and tab-complete a long boring device name
rather than typing it out in full) in return for that.
The SR-71 pilots used to say that if you weren't just a little bit
scared getting into the cockpit, it was time to retire. That's the way
I feel about a root shell: it's scary, and it should be. You can
destroy the entire machine with a single command. But that's why
you're running Unix in the first place: a tungsten-carbide disc
grinder will cut through more things than a pair of plastic safety
scissors, and those things need not include your hand.
I suppose sudo is fine for copying and pasting someone else's recipe
(though if you're doing that you're effectively trusting them with
your machine anyway), or for doing a set of standard configuration
commands when you're setting up a particular bit of software. But for
troubleshooting, where you may well need to have multiple rooty
processes running and talking to each other, it feels like just a
waste of keystrokes.
(The modern sysadmin approach of rebuilding the machine image from
scratch, rather than trying to work out why it went wrong and fix it…
is a subject for a separate rant.)
If you're running your own system rather than following someone else's
instructions, you'll simply get into the habit of prepending sudo to
certain commands. There will be nothing unusual about it, no frisson
to remind you that you're playing with the grown-ups now. Make fear
work for you: the # prompt can be a useful red flag.
Comments on this post are now closed. If you have particular grounds for adding a late comment, comment on a more recent post quoting the URL of this one.