# Root User

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

**Field:** Infrastructure  
**Category:** Linux & the Command Line  
**Also known as:** Superuser, Root Account, Root Login

## Think of it like

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

## 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

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

## 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.

## Why it matters

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

## Common mistake

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

## Three principles

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

## Related terms

- [sudo](https://learn.benibix.com/term/infrastructure/sudo)
- [File Permissions](https://learn.benibix.com/term/infrastructure/file-permissions)
- [User Group (Linux)](https://learn.benibix.com/term/infrastructure/user-group)
- [Root Directory (/)](https://learn.benibix.com/term/infrastructure/root-directory)
- [Zero Trust](https://learn.benibix.com/term/infrastructure/zero-trust)
- [sshd_config](https://learn.benibix.com/term/infrastructure/sshd-config)

## Told apart from

- [Root User vs Root Directory](https://learn.benibix.com/compare/root-user-vs-root-directory): People hear root and think of one thing. On Linux it names two. The root user is the account that may do anything. The root directory is the top folder, written /. The root user even has its own home folder, /root, which sits inside the root directory.
- [sudo vs Root User](https://learn.benibix.com/compare/sudo-vs-root-user): People think sudo is the root user, and it is not. Root is an account that can change anything on the machine. sudo is a command that lets a normal user act as root for one line, after typing their own password. Each use is written to a log, so you can see who did what. Commands typed while logged in as root leave no such line.

## Taught in

- [Root User and sudo](https://learn.benibix.com/learn/infrastructure-linux/root-user-and-sudo): Linux CLI, 5/10

![On the left, Jack, a normal user, types a command with sudo in front. A checkpoint asks for Jack's own password and checks that he is on the allowed list. The command then runs as root, user 0, on the right, and a line is written to the log below.](https://learn.benibix.com/diagrams/inf3-sudo.svg)

---

Source: https://learn.benibix.com/term/infrastructure/root-user
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
