Linux – different between root and sudo

linuxpermissionsroot

A root user can have all the privileges. But a normal user can gain access like a root with su or sudo command and their own password.

So what's the difference?

Best Answer

The su (and sudo) command traditionally require root's password. However, you can setup sudo so that ordinary users can achieve root privileges with their own password by modifying /etc/sudoers (as root, preferably with visudo).

Modern Linux distributions preconfigure the first user to be able to sudo with her own password. This prevents accidental system malconfiguration by the user, and enables them to gain full control without the need of a separate root password.

Related Question