Linux File System Explained!
ByteByteGo
5 min, 16 sec
The video explains the structure and purpose of key directories in the Linux Filesystem Hierarchy Standard (FHS).
Summary
- The Linux community adopted the Filesystem Hierarchy Standard (FHS) to create a consistent directory structure across distributions.
- Executable binaries are housed in /bin, /usr/bin, /usr/local/bin, and their sbin counterparts, with each having a specific purpose.
- Shared libraries are found in /lib and /usr/lib, with early boot libraries separated from those not critical for system initialization.
- Configuration files live in /etc, user data in /home and /root, and variable data like logs and caches in /var.
- The virtual filesystems /proc and /sys provide high to low-level system observability and are crucial for performance tuning and forensic triage.
Chapter 1
![Introduction to the chaos in early Linux distributions and the adoption of the Filesystem Hierarchy Standard (FHS).](https://www.videogist.co/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6OTM4OTEsInB1ciI6ImJsb2JfaWQifX0=--769a0adab858bd172dd27e1a5b491042bfd39495/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls3MjAsbnVsbF19LCJwdXIiOiJ2YXJpYXRpb24ifX0=--c9426325207613fdd890ee7713353fad711030c7/5425_23.jpg)
Introduction to the chaos in early Linux distributions and the adoption of the Filesystem Hierarchy Standard (FHS).
- Early Linux distributions had varying structures, causing confusion.
- The Filesystem Hierarchy Standard (FHS) was adopted to standardize directory structures.
- Not all distributions strictly follow FHS; some include custom modifications.
![Introduction to the chaos in early Linux distributions and the adoption of the Filesystem Hierarchy Standard (FHS).](https://www.videogist.co/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6OTM4OTEsInB1ciI6ImJsb2JfaWQifX0=--769a0adab858bd172dd27e1a5b491042bfd39495/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls3MjAsbnVsbF19LCJwdXIiOiJ2YXJpYXRpb24ifX0=--c9426325207613fdd890ee7713353fad711030c7/5425_23.jpg)
Chapter 2
![Exploration of directories containing executable binaries and system utilities.](https://www.videogist.co/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6OTM4OTMsInB1ciI6ImJsb2JfaWQifX0=--c1c304cafdd65521263fd61d2b667f41d2d55c0e/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls3MjAsbnVsbF19LCJwdXIiOiJ2YXJpYXRpb24ifX0=--c9426325207613fdd890ee7713353fad711030c7/5425_87.jpg)
Exploration of directories containing executable binaries and system utilities.
- /bin contains essential OS programs needed before /usr is mounted.
- /usr/bin is for user-installed programs; /usr/local/bin is for admin-installed binaries.
- Binary default precedence is set by the PATH variable; sbin directories are for root-required utilities.
![Exploration of directories containing executable binaries and system utilities.](https://www.videogist.co/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6OTM4OTMsInB1ciI6ImJsb2JfaWQifX0=--c1c304cafdd65521263fd61d2b667f41d2d55c0e/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls3MjAsbnVsbF19LCJwdXIiOiJ2YXJpYXRpb24ifX0=--c9426325207613fdd890ee7713353fad711030c7/5425_87.jpg)
Chapter 3
![Details about shared libraries and system configuration file locations.](https://www.videogist.co/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6OTM4OTUsInB1ciI6ImJsb2JfaWQifX0=--64a9197dada59dd301e6ed2a60a16349c5f14329/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls3MjAsbnVsbF19LCJwdXIiOiJ2YXJpYXRpb24ifX0=--c9426325207613fdd890ee7713353fad711030c7/5425_157.jpg)
Details about shared libraries and system configuration file locations.
- /lib contains essential shared libraries for early boot, while /usr/lib contains libraries for non-critical initialization.
- Libraries like glibc and libstdc++ provide core functionalities, with library search order managed by LD_LIBRARY_PATH.
- /etc houses all text-based configuration files controlling various system aspects.
![Details about shared libraries and system configuration file locations.](https://www.videogist.co/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6OTM4OTUsInB1ciI6ImJsb2JfaWQifX0=--64a9197dada59dd301e6ed2a60a16349c5f14329/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls3MjAsbnVsbF19LCJwdXIiOiJ2YXJpYXRpb24ifX0=--c9426325207613fdd890ee7713353fad711030c7/5425_157.jpg)
Chapter 4
![Overview of directories for user data and variable system data.](https://www.videogist.co/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6OTM4OTcsInB1ciI6ImJsb2JfaWQifX0=--503c21740305fa1092af71c4e90fe64fa5f73fb8/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls3MjAsbnVsbF19LCJwdXIiOiJ2YXJpYXRpb24ifX0=--c9426325207613fdd890ee7713353fad711030c7/5425_198.jpg)
Overview of directories for user data and variable system data.
- /home and /root are designated for user and admin documents and media respectively.
- /var contains frequently changing data like logs and caches, with /var/log being especially important for system inspections.
![Overview of directories for user data and variable system data.](https://www.videogist.co/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6OTM4OTcsInB1ciI6ImJsb2JfaWQifX0=--503c21740305fa1092af71c4e90fe64fa5f73fb8/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls3MjAsbnVsbF19LCJwdXIiOiJ2YXJpYXRpb24ifX0=--c9426325207613fdd890ee7713353fad711030c7/5425_198.jpg)
Chapter 5
![Examination of /run for volatile data and the virtual filesystems /proc and /sys for system observability.](https://www.videogist.co/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6OTM4OTksInB1ciI6ImJsb2JfaWQifX0=--d872b6c719fb1f59ed727a553bf488d99dedd3a9/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls3MjAsbnVsbF19LCJwdXIiOiJ2YXJpYXRpb24ifX0=--c9426325207613fdd890ee7713353fad711030c7/5425_245.jpg)
Examination of /run for volatile data and the virtual filesystems /proc and /sys for system observability.
- /run holds volatile runtime information for system services.
- /proc provides overall OS state insights, and /sys allows granular monitoring and configuration of kernel and hardware components.
![Examination of /run for volatile data and the virtual filesystems /proc and /sys for system observability.](https://www.videogist.co/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6OTM4OTksInB1ciI6ImJsb2JfaWQifX0=--d872b6c719fb1f59ed727a553bf488d99dedd3a9/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls3MjAsbnVsbF19LCJwdXIiOiJ2YXJpYXRpb24ifX0=--c9426325207613fdd890ee7713353fad711030c7/5425_245.jpg)
More ByteByteGo summaries
![DevOps vs SRE vs Platform Engineering | Clear Big Misconceptions](https://www.videogist.co/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MTAwNTAsInB1ciI6ImJsb2JfaWQifX0=--1d05acc80b29601d36b9280c23e0c477aa37c3e7/hqdefault.jpg)
DevOps vs SRE vs Platform Engineering | Clear Big Misconceptions
ByteByteGo
A detailed explanation of DevOps, SRE, and Platform Engineering, their roles, and how they contribute to efficient software delivery.
![Why is JWT popular?](https://www.videogist.co/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MTExMTMsInB1ciI6ImJsb2JfaWQifX0=--f4b8dcf5e512d8187e307db27c485da93e3e2710/hqdefault.jpg)
Why is JWT popular?
ByteByteGo
A detailed analysis of JWTs, including their structure, usage, and security considerations.
![Vertical Vs Horizontal Scaling: Key Differences You Should Know](https://www.videogist.co/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6Njk0NzEsInB1ciI6ImJsb2JfaWQifX0=--5d668f3d8fba1985c9f031b5b73ccb2389c7d37e/hqdefault.jpg)
Vertical Vs Horizontal Scaling: Key Differences You Should Know
ByteByteGo
An in-depth look at the concepts of vertical and horizontal scaling for startups experiencing growth.
![Top 6 Tools to Turn Code into Beautiful Diagrams](https://www.videogist.co/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MTEyMDM3LCJwdXIiOiJibG9iX2lkIn19--762088ce988462bcca2a5802926812dc773927f4/hqdefault.jpg)
Top 6 Tools to Turn Code into Beautiful Diagrams
ByteByteGo
The video presents a comprehensive guide on six innovative tools that can convert code into various types of architectural diagrams.