DEV Community

Chethan
Chethan

Posted on

A Beginner’s Guide to the Linux File System Hierarchy

When I first started exploring Linux, one of the things that confused me most was the file system layout. Unlike Windows, where everything is neatly tucked under C:\, Linux starts with a single root directory /, and from there, everything branches out into different subfolders with very specific purposes.

At first glance, it can feel overwhelming — why are there so many folders, and what do they all mean? But once you understand the logic behind the structure, navigating Linux becomes a lot more intuitive.

Let’s take a quick tour of the key directories in the Linux file system 👇

/bin

Essential binaries needed to boot and run basic commands.
Eg: ls, cp, cat

/sbin

System binaries and admin tools, mainly for the root user.
Eg: ip, mount, fdisk

/lib

Shared libraries and kernel modules required by /bin and /sbin.

/etc

Configuration files for the system and applications.
Eg: passwd, hosts

/home

Personal workspace for each user — your familiar "home directory."

/dev

Device files that act as an interface to hardware.
Eg: sda, sdb

/root

Home directory for the root (superuser).

/var

Variable files like logs, caches, and backups.

/usr

User-installed applications, binaries, and source code.

/tmp

Temporary files (wiped after reboot, with sticky bit).

/boot

Bootloader files required to start the operating system.

/proc

Virtual file system exposing kernel and process info.

/sys

Virtual file system for interacting with devices and drivers.

/run

Runtime process data since the last reboot.

/mnt

Temporary mount point for sysadmins.

/media

Mount point for removable devices like USBs, DVDs, CDs.

As I’m learning Linux, I’m curious:
👉 Which of these directories do you use or explore the most, and why?

I’d love to hear your experiences and tips — feel free to share them in the comments! 🙌

Top comments (0)