Skip to content
BENIBIX Learn

Root User

Infrastructure⌨️ Linux & the Command LineUsers and Permissions

Also known as Superuser, Root Account, Root Login

The boss account on Linux. It can change or delete any file.

Think of it like

Think of it like the head teacher's key. It opens every door in the school.

Example

Emma's new server lets her log in as root. Her first job is to make a normal user and turn root login off.

Why it matters

Anyone who gets root owns the whole machine. Guarding it is the first job on any server.

Definition

The root user is the all-powerful account on a Linux system. It can read, change or delete any file, and run any command. Its user number is 0. Nothing stops root from making a mistake, even a deadly one. So you work as a normal user and borrow root only for one command at a time. Many servers stop root from logging in over the network.

Example code

console
$ id root
uid=0(root) gid=0(root) groups=0(root)
The root user is always user number 0. The system trusts that number with everything.
Root sits at the top with a key to everything. Normal users borrow that power one command at a time.

Common mistake

Working as root all day. One typo then has no safety net at all.

Key takeaways

  1. 1
    User number 0. Trusted with everything.
  2. 2
    No safety net. Nothing blocks a mistake.
  3. 3
    Borrow, do not live. Use sudo for one command.

Compare

Learn it properly