All courses

Linux filesystem hierarchy

Explore the Linux directory structure and understand where system files, user files, and applications are stored.

Linux Fundamentals 5 min

Linux Filesystem Hierarchy

Linux organizes files into a hierarchical filesystem that begins at the root directory "/".

Important directories

Directory| Purpose
"/"| Root of the filesystem
"/home"| User home directories
"/root"| Root user's home
"/etc"| System configuration
"/var"| Variable data and logs
"/tmp"| Temporary files
"/usr"| User applications and utilities
"/bin"| Essential command binaries
"/dev"| Device files
"/proc"| Process and kernel information

Explore the filesystem

ls /
ls /home
ls /etc
ls /var

Absolute and relative paths

An absolute path begins from "/".

Example:

/home/student/Documents

A relative path is interpreted from the current directory.

Special path symbols:

.
..
~

"." means current directory.

".." means parent directory.

"~" means your home directory.

Practical exercise

Explore at least five directories.

Write down what each directory contains and why it exists.

Knowledge check

  1. What is the root directory?
  2. Where are system configuration files stored?
  3. What does ".." mean?
Previous Log in to save progress