Fundamentals 8 min read

Demystifying Linux File Systems: From Basics to VFS Architecture

This article explains what a file system is, how Linux organizes directories, the role of mounting and the Filesystem Hierarchy Standard, and introduces the Virtual File System layer that abstracts different storage formats.

ITPUB
ITPUB
ITPUB
Demystifying Linux File Systems: From Basics to VFS Architecture

Linux veterans are familiar with file systems, but newcomers often feel confused; this article shares a step‑by‑step guide on how to understand Linux file systems.

It starts by defining a file system as a management system for files, which are collections of data stored on media such as hard disks, optical discs, or USB drives. Users typically ask where their files are stored, how to write data to a file, how to read data, and how to delete unnecessary files.

The article explains that a file system provides naming conventions and organizational rules to enable file lookup and access. In Unix/Linux, a file system must be mounted onto an existing directory before it can be used, following the Filesystem Hierarchy Standard (FHS) that specifies where applications, tools, scripts, and documentation reside across distributions.

Directories form a tree structure; each directory can contain files and sub‑directories. The root directory "/" represents the top of this tree. When a storage device (e.g., a hard‑disk partition formatted as ext3 or ext4) is mounted at "/", it becomes the root file system, visible as the full directory tree in memory via the VFS (Virtual File System) layer.

Typical workflow for a user or developer:

Format a device with mkfs.ext4 or similar (e.g., mkfs.fat for FAT32).

Mount the device to a mount point using mount /dev/sdx1 /mnt/usb.

Perform create, read, update, delete (CRUD) operations on files within that mount point.

The article highlights two key concepts for deeper analysis:

The mounting mechanism, which is hidden in Windows but explicit in Unix/Linux, and is crucial when examining source code.

Directories as the universal organizational unit, answering the user’s question “where are my files?”

Historically, Linux kernels integrated file system code directly, causing incompatibility (e.g., a system only recognizing ext3 could not use a FAT32 USB drive). To support multiple file system types, Linux adopted the VFS layer, originally proposed by Sun for NFS. VFS abstracts the underlying file system details, offering a uniform system‑call interface to applications while allowing different concrete file systems to plug in.

Summary: A file system defines how files and data structures are organized on storage media. Users see a hierarchical directory tree, but developers must understand that each directory can host a different mounted file system and that VFS provides a common interface for all. When creating a new file system, adhering to VFS specifications is essential.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

vfsMountFilesystem Hierarchy Standard
ITPUB
Written by

ITPUB

Official ITPUB account sharing technical insights, community news, and exciting events.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.