FileSystem Hierarchy Standard
Name
Institution
Introduction
The filesystem hierarchy standard refers to a set of guidelines and requirements meant for directory and file placement with the guidance of an operating system that is under the UNIX. All of these guidelines are aimed at supporting the interoperability of applications, developing tools and scripts, supporting system administration tools, and enabling uniform documentation of all these systems. The primary purpose of the standard is to help its users and software in predicting the location of directories and files that have been installed. The software and users are able to perform this activity through making specification of the guiding principles meant for each area, specifying the minimum number of directories and files needed, mentioning exceptions to the identified cases and principles which have always had a conflict in the past. The File system hierarchy standard can be used by different people, namely: OS creators, independent software suppliers, and other users who aim at understanding and maintaining the FHS compliance of any system.
The filesystem
The filesystem standard aims at making all file systems that are FHS-compliant to have an operating system that has the ability to support some basic security features that are also found in UNIX filesystems. It is in this area that users need to identify two independent and significant distinctions that exist in files. They are required to determine aspects such as shareable vs. unshareable and static vs. variable.
The Root filesystem
It is necessary that what the root filesystem contains has been made almost enough for it to have the ability to help boot the system, restore, make it recover, and also repair it. For the booting process to be successful, there should be enough data and software to help in the mounting of other filesystems. Also, for the recovery and restoration process to be successful, then there should exist the necessary utilities in the root filesystem. There are various directories that should exist in the system, such as bin, boot, media, lib, and many more. There are also specific options, such as home and root, which are meant for corresponding subsystems.
Directories
-
/bin (essential user command binaries): this directory has commands that can help the user and the system administrator in storing binary executable files. In this directory, there are no subdirectories. The commands that exist under /bin include cat, chgrp, cp, dd, df, and many more. There are specific options such as csh, ed, cpio, zcat, and ping that can be used in /bin whenever another corresponding subsystem is used.
-
/boot (boot loaders’ files that are static files): this directory is majorly meant to store data used right before the user-mode programs are executed by the kernel.
-
/dev (Device files): this directory is majorly used as a location of a device or special files.
-
/etc.: this involves files meant for configuration that help in controlling program operation. For instance; /etc/opt: this directory is meant to store host-specific configuration files that can be used for add-on application software packages; /etc/ X11: this directory is meant to act as a location for all X11 host-specific configuration and can allow control locally; /etc/sgml: this one allows installation of files that are generically configured and /etc/xml: which allows the installation of generic configuration files with high-level XML system parameters.
-
/home (user-home directives): this is a filesystem that is site-specific, and it may be different from one host to another.
-
/lib (essential modules of kernel and libraries that are shared): it majorly involves library images that are shared and also essential for system booting and running of commands in the root filesystem.
-
/media (point for mounting for removable media): majorly has subdirectories that are used as points for mounting removable media.
-
/mnt: this specifically helps a system administrator to mount temporarily a filesystem.
-
/opt (application software that acts as an add-on package): this enables the installation of application software that have the add-on packages.
-
/run (run-time variable data): this directory enables the user to obtain data on the system information which helps describe the system.
-
/sbin (system binaries): this directory is similar to /bin as it has programs that only the system administrator can operate.
-
/srv (information on the system services): involves data that is specific in site and that helps serve the system.
-
/tmp (temporary files): this directory help programs have temporary files.
The /usr Hierarchy
The /usr directory is one of the major sections that make up the filesystem. It is usually read-only and is shareable. Under this hierarchy, there are various directories, and they include:
-
/usr/bin (most user commands): this can be referred to as the primary directory as it helps the system execute commands
-
/usr/include (standard include files directory): this involves the directory that enables the C programming language to be made possible. ‘
-
/usr/lib (packages and programming library): the libraries and files are all included here and sometimes the internal binaries also specifically those that execution by the shell scripts or users is impossible.
-
/usr/libexec (binaries run by other programs): majorly concerns internal binaries especially those that may not be executed by shell scripts or the users themselves directly.
-
/usr/lib<qual> (alternate format libraries): this directive performs a similar role as /usr/lib when there is an alternative binary format.
-
/usr/local (local hierarchy): this helps the system administrator to install software locally.
-
/usr/sbin (standard system binaries that are non-essential): this directive helps the system administrator to use non-essential binaries exclusively.
-
/usr/share (Architecture independent data): is meant for read-only independent data files for architecture as it is shareable across all platforms of architecture in the particular operating system.
-
/usr/src (source code): the source code directive is mostly used for reference purposes.
The /var Hierarchy
This type of hierarchy has data files that are variable. This majorly includes logging data, spool files and directories, and temporary files.
The hierarchy involves:
-
/var/account (logs of process accounting): it holds the log of active process accounting and data of the composite process.
-
/var/cache (application cache data): this application is meant to help in the restoration of data.
-
/var/cache/fonts (locally-generated fonts): helps in the storing of dynamically-created fonts, especially those that are automatically generated.
-
/var/cache/man (locally-formatted manual pages): helps in the provision of standard locations for all sites that provide read-only partitions.
-
/var/crash (system crash dumps): helps in the holding of system crash dumps.
-
/var/games (data of variable game): this involves data that is related to games in the /usr directive.
-
/var/lib (information o variable state): it contains any information on the state that pertains to the system or application.
-
/var/lock (Lock files): this helps in the storage of not only the lock files but also other important resources that have multiple applicants.
-
/var/log (Log directories and files): it helps in the storage of miscellaneous log files.
-
/var/mail (files involved with the mailbox of the users): it makes the mail spool to become accessible by making them take the form of the username.
-
/var/opt : helps in installation of variable data packages.
-
/var/run (Run-time variable data: helps ensure that the systems and the software are compatible.
-
/var/spool (Application spool data): stores data that can be termed as incomplete as it is awaiting some later processing.
-
/var/tmp (files preserved temporarily when system rebooting is taking place): this is meant to help programs that require directories or files to be preserved whenever the system is being rebooted.
-
/var/yp (Network Information Service database files): this one helps in the storage of NIS variable data.
Operating system specific annex
Linux: this section helps in obtaining information and recommendations about how particular operating systems work. Some of the directives in this section include: /bin, /dev, /etc, /proc,/ sbin, /sys, /usr/include, /usr/src and /var/spool/cron.
Reference
LBS. A workgroup (2015). Filesystem Hierarchy Standard. The Linux Foundation.