-2

I was looking some time on Internet what is the difference between sudo and root privileges,but there are many different explanations and commands that I do not need yet because I'm just a beginner.

Why we can install some applications and not the others etc.? I tried to install some software but because i don't know that difference, i have errors

Simon
  • 113

1 Answers1

10
  • root is a user that has unlimited privileges.
  • sudo is the act of temporary elevating privileges of a normal user, but designated as an admin, to the level of the root user.

A reason we use sudo is because it makes it a little bit more difficult to remotely get into a machine: you now need to know the admin user name where previously you could assume the admin name was root.

Another reason is logging: when logs get written as "root did this" you know it happened but not by who. "sudo" writes log with the username, so when we have 2+ admins the logs include the user name who did the action.

sudo also allows for users to have limited admin access: you can have a user that can do a single task (or a few tasks) that need elevated permissions.

sudo makes a system better manageable.

Rinzwind
  • 299,756
  • 1
    +1; I'd add another advantage with sudo: After using sudo command, the shell returns to your regular user ID, and the following commands will be run with normal permissions. If you log in as root you may forget about it and continue to do 'normal' tasks as root, which increases the risk that you damage the system by mistake. – sudodus Jun 28 '18 at 11:57