What is root in Linux

Root Definition

In computing the superuser is a special user account used for system administration. Depending on the operating system, the actual name of the account might be root, administrator, admin or supervisor. In some cases, the actual name of the account is not the determining factor; on Unix-like system for example, the user with a user identifier of zero is the superuser, regardless of the name of that account and in system which implement a role based security model, any user with the role of superuser can carry out all actions of the superuser account. The Principle of least privilege recommends that most users and applications run under an ordinary account to perform their work, as a superuser account is capable of making unrestricted, potentially adverse system-wide change.

What is root user

Unix and Unix-Like. In Unix-like computer OSes, root is the conventional name of the user who has all rights or permissions in all modes. Alternative names include baron in BeOS and avatar on some Unix Variants. BSD often provides a root account in addition to a root account. Regardless of the name, the superuser always has a user ID of 0. The root user can do many things an ordinary user cannot, such as changing the ownership of files and binding to network ports number below 1024.

The name root many have originated because root is the only user with permission to modify the root directory of a Unix system. This directory was originally considered to be root’s home directory, but the UNIX Filesystem Hierarchy Standard now recommends that root’s home be at /root. The first process bootstrapped in a Unix-like system, usually called init, runs with root privileges. It spawns all other processes directly or indirectly, which inherit their parent’s privileges. Only a process running as root is allowed to change its user ID to that of another user; once it’s done so, there is no way back. Doing so is sometimes called dropping root privileges and is often done as a security measure to limit the damage from possible contamination of the process.

It is often recommended that no-one use root as their normal user account, since simple typographical errors in entering commands can cause major damage to the system. Instead, a normal user account should be used and then either the su or sudo command is used. The su approach requires the user to know the root password, while the sudo method requires that the user has been set up with the power to run “as root” within the /etc/sudoers file, typically indirectly by being made a member of the wheel, adm, admin, or sudo group.

For a number of reasons, the sudo approach is now generally preferred – for example it leaves an audit trail of who has used the command and what administrative operations they performed

Leave your message if anything missed and we appreciate your comments.