Linux Directory Structure and File System Hierarchy Standard (FHS)

Linux has no drive letters: every file lives in one single tree that starts at the root, /, and the Filesystem Hierarchy Standard fixes what belongs where, so /etc holds configuration, /home holds users, /bin holds commands, on every Linux system.

10 min read · 7 cards · 2 checks

Read in: English · हिन्दी · ગુજરાતી


Theory

One tree, no drive letters

If you come from Windows, you expect drives named C: and D:. Linux does it differently: there is one single tree of directories, and it starts at a place called the root, written simply as /. Every file on the system, on every disk, lives somewhere in that one tree.

Extra disks or USB drives do not become new letters; they are mounted into the tree at some directory. So to find your way around the campus server, you need a map of this tree, and helpfully, Linux systems follow a standard layout. This lesson gives you that map.

Theory

The root and the standard layout

Everything hangs off the root directory /. A path that starts with / is an absolute path, giving the full route from the root, for example /home/riya/notes.txt.

Because a free-for-all would be chaos, Linux distributions follow the Filesystem Hierarchy Standard (FHS), which fixes what each top-level directory is for. This is why you can sit at almost any Linux system and know that configuration lives in /etc, users live in /home, and essential commands live in /bin. The names and purposes are consistent across systems, which is a large part of why Linux skills transfer everywhere.

At a glance

DirectoryWhat it holds
/The root: the top of the single tree, everything lives under it
/binEssential user commands (ls, cp, cat, and more)
/etcSystem configuration files
/homeOrdinary users' home directories (e.g. /home/riya)
/varVariable data that grows: logs, mail, spool files
/tmpTemporary files (often cleared on reboot)
/usrUser programs and data (/usr/bin, libraries, docs)
/devDevice files (the hardware-as-files)

Formula

Where your work lives: /home

On the campus server, your personal files live in your home directory, under /home, for example /home/riya. This is your space: you own it, you can freely create and edit files there, and it is where the shell usually starts you.

Meanwhile the system's shared parts, /etc, /bin, /usr, are protected and mostly owned by the administrator, so you can use them but not carelessly change them. Knowing that your work belongs in /home, and system files live elsewhere, keeps you oriented and safe.

Quiz

On a Linux server, in which directory would you expect to find system configuration files?

  1. /home, because that is where everything is kept
  2. /etc, the standard location for system configuration files
  3. /tmp, because configuration is temporary
  4. /dev, because configuration controls devices
Show the answer

/etc, the standard location for system configuration files

Under the Filesystem Hierarchy Standard, /etc is the standard directory for system configuration files, and you can rely on that across Linux systems. Option A is wrong: /home holds users' personal directories, not system configuration. Option C is wrong: /tmp is for temporary files that may be cleared on reboot, configuration must persist, so it does not belong there. Option D is wrong: /dev holds device files (hardware as files), not configuration. The value of the FHS is exactly this predictability: configuration is always in /etc, users in /home, essential commands in /bin, on every compliant system.

Think first

Why standardise the directory layout across all systems?

Why does it matter that /etc, /home, and /bin mean the same thing on every Linux machine? Then tap.

Show the answer

Because a shared, predictable layout makes knowledge and software PORTABLE across every Linux system, which is a huge practical win. If each machine invented its own directory scheme, you would have to relearn where everything lives on every new server, and administrators, scripts, and installed programs could never assume anything. With the Filesystem Hierarchy Standard, you sit down at any Linux box, the campus server, a cloud instance, an unfamiliar distribution, and you already know configuration is in /etc, logs are in /var, your files are in /home, and commands are in /bin. Software installers know where to put things; backup scripts know what to save; documentation applies everywhere. It turns 'this particular machine' knowledge into 'all Linux' knowledge. This is one reason Linux skills are so valued: because the layout is standard, what you learn on one system transfers directly to the millions of others. Predictability is productivity: one map fits them all.

Summary

Key takeaways

  • Linux uses one single directory tree starting at the root, /, with no drive letters; other disks are mounted into the tree.
  • A path starting with / is an absolute path, the full route from the root (e.g. /home/riya/notes.txt).
  • The Filesystem Hierarchy Standard (FHS) fixes what each top-level directory is for, consistently across systems.
  • Key directories: /bin (commands), /etc (configuration), /home (users), /var (logs and variable data), /tmp (temporary), /usr (programs), /dev (devices).
  • Your personal work lives in your home directory under /home; system directories are protected.
  • Standardising the layout makes skills, scripts, and software portable across all Linux systems.
  • Memory hook: one tree from /, and the FHS tells you what lives where.

Study this properly

This page is the lesson to read. In Gri-Learn the same topic is a graded deck: the self-checks are scored and your weak topics are tracked. Free to start.

Start this topic

Already have an account? Sign in

More from Introduction to Linux Operating System

Gri-Learn · syllabus-mapped B.C.A. lessons in English, Hindi and Gujarati

Linux Directory Structure and File System Hierarchy Standard (FHS) · Linux Operating System (LOS) (Minor-04) · Gri-Learn