Where Is Linux’s “Drive”? A Plain‑English Guide to File‑System Internals
This article demystifies Linux’s “everything is a file” philosophy, explains the single‑tree mount model, outlines the seven file‑type categories, compares ext4, XFS, and Btrfs, and provides essential commands and common pitfalls for managing Linux file systems.
01 "Everything Is a File" Explained
The phrase means that Linux represents not only regular files but also devices, sockets, and processes as file objects, allowing uniform access via open(), read(), write(), and close(). Examples include a USB stick appearing as /dev/sdb1 and a network socket represented by a file in the filesystem.
Linux defines seven file types: regular files, directory files, block device files, character device files, symbolic links, pipe files, and socket files. The leading character shown by ls -l identifies the type (e.g., - for regular, d for directory, b for block device, etc.).
02 No C: D E Drives – Where Files Reside
Unlike Windows, which assigns each partition its own drive letter, Linux mounts all storage devices into a single directory tree rooted at /. External media such as a USB drive is attached under /mnt/usb or /media, and removal simply unmounts that branch.
Key top‑level directories include:
/bin and /usr/bin : system commands
/etc : configuration files
/home : user home directories
/var : variable data like logs and databases
/tmp : temporary files cleared on reboot
/proc : virtual files exposing kernel and process information
/sys : hardware status information
/dev : device files
/mnt and /media : mount points for external devices
03 Overview of Common Filesystem Types
ext4 is the default on most distributions (Debian, Ubuntu, CentOS 7). It offers up to 16 TB per file and 1 EB per filesystem, journaling for quick recovery, and backward compatibility with ext3/ext2. It is described as stable and suitable for general‑purpose servers.
XFS originated at SGI and is the default for RHEL/CentOS 8. It excels in handling large files and high‑concurrency workloads, offering up to 8 EB per file and strong parallel I/O performance. However, XFS can only be expanded, not shrunk.
Btrfs (from Oracle) provides advanced features such as snapshots, transparent compression, subvolumes, and data checksumming. While attractive for experimentation, its production stability lags behind ext4 and XFS.
Windows‑origin filesystems are also listed for reference:
FAT32 : highest compatibility, 4 GB file size limit.
exFAT : removes the 4 GB limit, common on USB drives.
NTFS : Windows system partition with permissions and encryption support.
Memory‑based pseudo‑filesystems include tmpfs (in‑memory, fast, cleared on reboot), proc (process and system info), and sysfs (hardware attributes).
04 Frequently Used Commands Cheat Sheet
Common pitfalls highlighted:
ext4 may run out of inodes with many small files; consider XFS or larger inode count.
XFS cannot be shrunk after creation.
Incorrect UUID in /etc/fstab can prevent boot; always back up first.
NTFS writes default 777 permissions on Linux, limiting fine‑grained control. fsck must run on unmounted filesystems.
Conclusion
Understanding Linux’s unified file abstraction and single‑tree hierarchy reveals an elegant design: all resources are accessed through the same read/write interface, and mounting integrates devices seamlessly under /. The next time someone asks where Linux’s “C drive” is, you can answer confidently: it’s the whole tree under /.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
AI Agent Super App
AI agent applications, installation, large-model testing, computer fundamentals, IT operations and maintenance exchange, network technology exchange, Linux learning
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
