In
Unix-like computer OSes (such as
Linux),
root is the conventional name of the user who has all rights or permissions (to all files and programs) in all modes (single- or multi-user). Alternative names include
baron in
BeOS and
avatar on some Unix variants.
BSD often provides a
toor ("root" written backward) 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 numbered below 1024. The name
root may have originated because
root is the only user account 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 .'''' The first process
bootstrapped in a
Unix-like system, usually called , runs with root privileges. It spawns all other processes directly or indirectly, which inherit their parents' privileges. Only a process running as root is allowed to change its user ID to that of another user; once it has 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. Another case is and other programs that ask users for credentials and in case of successful
authentication allow them to run programs with privileges of their accounts. It is often recommended that
root is never used as a 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 (substitute user) or (substitute user do) command is used. The approach requires the user to know the root password, while the method requires that the user be set up with the power to run "as root" within the file, typically indirectly by being made a member of the
wheel,
adm,
admin, or
sudo group. For a number of reasons, the approach is now generally preferred – for example it leaves an
audit trail of who has used the command and what administrative operations they performed. Some OSes, such as
macOS and some
Linux distributions (most notably
Ubuntu), automatically give the initial user created the ability to run as root via – but this is configured to ask them for their password before doing administrative actions. In some cases the actual
root account is disabled by default, so it can't be directly used. ==Windows==