Translation(s): العربية - English - Español - Català - Français - Italiano - Português (Brasil) - Русский - Svenska - 简体中文
root is the name of the most powerful account on a Debian system. Root is sometimes referred to as the system's administrator or supervisor account.
The root account can usually do anything on a Debian system, but root's abilities can be constrained using Mandatory Access Controls (MAC) through AppArmor or SELinux (constraining the root user is an old concept in operating systems, for example Solaris used Role-Based Access Control).
root has uid 0 and gid 0. Root's home (~) directory is /root.
Password
At installation time, you are asked whether you want to use the root account or not.
If you choose to use a root account (the default), you'll be asked to provide a complex password for root. Use a strong one!
If you opt not to, no root account is enabled but the first user created will be able to perform administration tasks using its own password (see sudo).
If you forgot your root password, you first need to reset the password, then log as root (now accessible without password) and run passwd to set a new root password.
How to obtain root access
You will need to obtain root access for system administration, for example to start or stop services or to make configuration changes. The following lists some of the ways to obtain root using various desktop and terminal programs:
su allows you to change your identity to root from a terminal
If they are installed and configured, you can use sudo or doas to run a given command as root from the terminal.
Under MATE: Access a terminal via Application Menu/Accessories/Root Terminal
When you change from a normal user to root, your terminal prompt will change from user@mypc:~$ to root@mypc:/home/user#. To find out as which user you're operating now, execute the command whoami.
Debian Live CD root password
If you try Debian using a Live CD, then you can use the username "user" and password "live" to login and elevate privileges.
The live user does not require a password to run commands using sudo:
# cat /etc/sudoers.d/live user ALL=(ALL) NOPASSWD: ALL
CategoryRoot | CategorySystemSecurity | CategorySystemAdministration
