root filesystem

The top of the directory tree, written as a single slash, under which every other file and directory hangs.

In more detail

An absolute path starts at the root, so /tmp/notes means the tmp directory inside the root. On Linux and macOS there is only one tree; extra disks are mounted into it as directories. Inside a container the root filesystem comes from the image layers plus a writable layer, not from the host.

Examples

docker image inspect alpine:3.20 -f '{{.RootFS.Type}}'   # layers
Every path on Linux starts from the root directory, and other filesystems are mounted into the tree beneath it. During boot the initramfs finds and mounts the real root filesystem, named by the root= kernel parameter, before handing over to the first user space process. If the kernel cannot find it, boot stops before any service starts.

Related terms

Taught in

References

Certification courses