Sudo vs Root


There has long been a debate, especially among Linux people, as to whether it is better to do administrator tasks as root or via sudo.  For me the debate is won by personal need and use alone.  If you are the lone user, and all that exists is your user account and root access; all you really need is root.

Sudo is better suited to systems with multiple users, and where each requires different limitations; along with also being able to see the logs of each user, and how they're using the abilities they do have.  It's largely for users that you don't trust with the root password, whether based on their skill (worried that they might mess something up) or based on pure trust; maybe both.

My advice is that if you don't trust the ability or intent of someone, then don't let them use your computer.  It would be better to provide them with their own, but that isn't always an option at companies or schools.

Using sudo also requires you to enter sudo in front of commands, which when you add the space needed after equals five extra characters piggybacked onto virtually every command you ever type to get important things done.

For me the best and most direct way to get restricted privilege tasks done (in Debian), will always be when logged in as a standard user and accessing root from the Root Terminal.

Use sudo when truly needed, but even in many of those cases you could get by with root if you add in some trust and discretion.

The main point is that if you trust in your ability, and the ability of those that also have access to your hardware, you never really need to bother with sudo.  I don't.

Like I said...  use it when you truly feel you need to; otherwise it's just an unneeded extra hurdle IMHO.


My personal method for installing anything in Debian or MintPPC:

1. Login to the GUI with your user account

2. Open the Root Terminal (found in the accessories menu)

3. After entering your root password, type:

apt-get install packagename


You know that old expression that goes "keep it simple stupid"?  In this case it's more appropriate to say keep it simple evolved one; since you're using Debian after all.

Several readers have emailed me about this over time, so now you all know where I stand on the whole sudo vs root thing.  Sudo is safer for the paranoid and/or less capable, but root is the best quick & dirty of all; especially if you have the confidence and ability to backup using it.

If you want to learn about using sudo in Debian, read this.

2 comments:

  1. i never use sudo either

    ReplyDelete
    Replies
    1. I use sudo or su or login as root depending on the weather and my mood.

      Delete