File Hierarchy Standard (FHS)

Stable: 15.06.2022 - 16:05 / Revision: 01.04.2022 - 16:33

I am here to prevent the first-page-empty bug!

Template:ArticleMainWriter Template:ReviewersList Template:ArticleApprovedVersion


SUMMARY
This article lists and describes the OpenSTLinux file-system hierarchy (Weston and core).

1 Introduction

Linux® is a file-oriented operating system. This means that any application, library, or other information related, for example, to configurations and running applications is stored in files only.

The Filesystem Hierarchy Standard (FHS) defines the directory structure and directory contents in Linux distributions.
It is maintained by the Linux Foundation. The latest version is 3.0, released on June 3rd 2015[1]

The main parts described by the FHS are:

  • the physical filesystem: any mass storage devices (NAND/eMMC/... partitions, USB key partitions, and so on)
  • pseudo filesystem: created dynamically at boot-up (and/or at runtime) to store various information and configurations related to the software being run
  • remote filesystem: rootfs can contain links to a network filesystem

OpenSTLinux images respect the latest FHS definition: 3.0

2 Root filesystem content

  • The filesystem root of any Linux Distribution (OpenSTLinux included) is named '/' or 'root' (do not confuse with the 'root' super user name).

There are no files in the root path, only directories that shape the Linux FHS, as listed below:

bin/ Essential command binaries
boot/ Static boot loader files
dev/ Device files (temporary filessytem devtmpfs)
etc/ Host-specific system configuration
lib/ Essential shared libraries and kernel modules
media/ Mount point for removable media
mnt/ Mount point for temporarily mounting a filesystem
proc/ Kernel and process information (pseudo filesystem procfs)
opt/ Add-on application software packages
run/ Data relevant to running processes
sbin/ Essential system binaries
sys/ Kernel and system information (pseudo filesystem sysfs))
srv/ Data for system-provided services
tmp/ Temporary files
usr/ Secondary filesystem-hierarchy
var/ Variable data
  • As a standard Linux distribution, the OpenSTLinux distribution includes the optional user directories:
/home User home directories (optional)
/root Home directory for the root user (optional)

Details of the directory purpose, content or sub-hierarchy can be found in the official documentation: FHS-3.0

  • OpenSTLinux also integrates a vendorfs filesystem, mounted on a dedicated Flash-memory partition (that is, /dev/mmcblk0p5):
/vendor Vendor dedicated directory

This directory allows the storage of specific vendor libraries.

3 References

IMPORTANT NOTICE – READ CAREFULLY
STMicroelectronics NV and its subsidiaries ("ST") reserve the right to make changes, corrections, enhancements, modifications, and improvements to ST products and/or to this document at any time without notice. Purchasers should obtain the latest relevant information on ST products before placing orders. ST products are sold pursuant to ST’s terms and conditions of sale in place at the time of order acknowledgment.

Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for application assistance or the design of purchasers’ products.

No license, express or implied, to any intellectual property right is granted by ST herein.

Resale of ST products with provisions different from the information set forth herein shall void any warranty granted by ST for such product.

ST and the ST logo are trademarks of ST. For additional information about ST trademarks, refer to www.st.com/trademarks. All other product or service names are the property of their respective owners.

Information in this document supersedes and replaces information previously supplied in any prior versions of this document.