Skip to content
BENIBIX Learn

Root Directory (/)

Infrastructure⌨️ Linux & the Command LineFiles and Folders

Also known as Root Folder, Filesystem Root, Slash Directory

The top folder on Linux, written as /. All other folders sit in it.

Think of it like

Think of it like the trunk of a tree. Every branch and leaf grows out from it.

Example

Lucy types cd / and then ls. She sees the main folders, like home, etc and var, all inside the root.

Why it matters

Every path on a server starts here. Read a path from the left, from the root down.

Definition

The root directory is the top folder of a Linux system. It is written as one slash, /. Every other folder sits inside it, even other disks. So /home, /etc and /var all hang off the root. There is no drive letter like C: on Linux. Do not mix it up with the root user, who is a person, not a folder.

Example code

console
$ cd /
$ pwd
/
Go to the very top, then ask where you are. The answer is one slash.
The slash at the top is the root directory. Every other folder hangs below it.

Common mistake

Running a delete command on / by mistake. One wrong slash can wipe the whole system.

Key takeaways

  1. 1
    One slash. The root is written /.
  2. 2
    Top of the tree. Every folder sits below it.
  3. 3
    No drive letters. Other disks join the same tree.

Compare

Learn it properly