Linux File System Hunting
Like many students, I started my journey with Windows. It worked, but it always felt like a black box — things happened behind the scenes, and I had little visibility into how the system actually worked.
That curiosity led me to Linux.
What makes Linux different is not just that it's popular among developers or widely used on servers, but that it exposes its inner workings in a surprisingly transparent way. Almost everything — from running processes to hardware devices — is represented through the filesystem.
In this article, I explore the Linux filesystem not as a collection of folders, but as a map of how the operating system functions internally. By investigating key directories, I discovered how Linux handles configuration, networking, processes, and system behavior — all through files.
Introduction to the Linux Filesystem
At its core, the Linux filesystem is a way of organizing data and files on a storage device. Unlike operating systems like Windows, Linux treats everything as a file—whether it's a directory, a hardware device, or even an active process. This unified approach simplifies interactions and makes the system highly flexible.
The Linux filesystem is hierarchical, meaning it has a root directory (/) from which all other files and directories branch out, forming a tree-like structure. This structure is consistent across all Linux distributions, making it easier to navigate and manage multiple systems.
Filesystem Hierarchy Standard (FHS)
The Filesystem Hierarchy Standard (FHS) defines the directory structure and directory contents in Linux systems. Adherence to FHS ensures that software behaves predictably across different Linux distributions.
The root directory (/) serves as the starting point of the filesystem. Key subdirectories include:
/bin: Essential command binaries, likels,cp, andmv./boot: Bootloader files, including the kernel./dev: Device files representing hardware components./etc: Configuration files for the system./home: User home directories./lib: Essential shared libraries./mnt: Temporary mount points for filesystems./opt: Optional software packages./proc: Virtual filesystem providing process and kernel information./root: Home directory for the root user./sbin: System binaries, typically for administrative tasks./tmp: Temporary files./usr: Secondary hierarchy for user programs and data./var: Variable data files like logs, databases, and email.
Important Directories and Their Purposes
Each directory in the Linux filesystem has a specific role. Here’s a deeper look into some of the most critical directories:
/(Root Directory): The starting point of the filesystem. All other directories and files branch off from here./bin: Contains essential command binaries needed for the system to function in single-user mode. These are available to all users./sbin: Similar to/bin, but contains system binaries that are typically used by the root user for administrative tasks./lib: Contains shared libraries required by the binaries in/binand/sbin./usr: A secondary hierarchy that contains user programs, libraries, documentation, and more. It’s split into subdirectories like/usr/bin,/usr/sbin, and/usr/lib./var: Stores variable data like logs, databases, and spools. This directory often grows in size over time./etc: The nerve center for system configuration files. Nearly every service or application has a configuration file located here./home: Contains personal directories for each user. This is where users store their personal files and directories./proc: A virtual filesystem that provides an interface to kernel data structures. It’s used to access process information, kernel parameters, and more./dev: Contains device files that represent hardware components. These files act as interfaces to the corresponding hardware.
File Permissions and Ownership
Linux employs a robust permissions system that controls access to files and directories. Each file has three sets of permissions for the owner, the group, and others:
Read (
r): Permission to read the contents of the file.Write (
w): Permission to modify the file.Execute (
x): Permission to execute the file as a program.
Permissions are represented by a combination of letters (r, w, x) or their corresponding octal numbers (4 for read, 2 for write, 1 for execute).
For example, the permission rwxr-xr-- means:
Owner: Read, write, execute
Group: Read, execute
Others: Read only
Understanding and managing permissions is crucial for maintaining system security and ensuring that users have appropriate access levels.
Mounting and Unmounting Filesystems
Mounting is the process of making a filesystem accessible at a certain point in the directory tree. The mount point is typically an empty directory where the filesystem appears to reside.
- Mount Command: Used to attach a filesystem to a specified directory.
mount /dev/sdb1 /mnt
- Unmount Command: Used to detach a filesystem from the directory tree.
umount /mnt
Mounting is essential when working with removable media, network shares, or additional storage devices. Properly mounting and unmounting filesystems prevents data corruption and ensures system stability.



