Search⌘ K
AI Features

What is the FHS?

Explore the Filesystem Hierarchy Standard (FHS) used by Alpine Linux and understand how it organizes system directories. This lesson helps you identify correct file locations when packaging software, ensuring compliance with Alpine Linux quality requirements and smooth system operation.

Preface

When using more than one Linux distribution, we notice that executables are almost always in /usr/bin, config files are in /etc, and so on. This is the work of the Filesystem Hierarchy Standard (FHS), which standardizes the locations of different kinds of files across Linux distributions. This has multiple advantages:

  • A program can predict where files are located. This can be very useful. For example, take a shell script that downloads an executable for us and installs it to our system. Thanks to the FHS, it can just assume that installing the executable to /usr/local/bin (the standard location for user-supplied executables) is acceptable and that it doesn’t need special cases for different Linux distributions.
...