Linux filesystem

See how the Linux directory tree is organized.

Linux starts from one root directory, written as /. Everything else branches below it: commands, user files, devices, logs, configuration, mounted disks, and live kernel information.

How it works

Paths describe where a file lives below root.

An absolute path starts at /, such as /etc/ssh/sshd_config. A relative path starts from your current directory. Use pwd to see where you are, ls to list files, and cd to move through the tree.

Mounts

Other filesystems attach into the same tree.

A disk, USB drive, network share, or virtual filesystem can be mounted at a directory like /mnt/backup or /media/usb. After mounting, it behaves like another branch of the same tree.