Filesystem Hierarchy Standard
The Filesystem Hierarchy Standard (also known by its acronym FHS) is a standard that defines the main directories and their contents in the GNU/Linux operating system and other systems of the Unix family. It was originally designed in 1994 to standardize the file system of Linux distributions, based on the traditional directory organization of Unix systems. In 1995 the scope of the standard was extended to any Unix that is voluntary.
Overview
The process of developing a standard file system hierarchy began in August 1993 with a focused effort to restructure the Linux file and structure. The FSSTND (File System Standard), a file system hierarchy standard specific to the Linux operating system, was released on February 14, 1994. Later revisions they were released on October 9, 1994 and March 28, 1995.
In early 1996, the goal of developing a more comprehensive version of FSSTND to address not only Linux, but other UNIX-derived systems, was adopted with the help of community members. of BSD development. Therefore, a concentrated effort was made to focus on facts that were general to UNIX-derived systems. In recognition of this breadth of scope, the name of the standard was changed to File System Hierarchy Standard, or FHS for short.
The FHS is maintained by the Free Standards Group (now The Linux Foundation), a non-profit organization made up of leading software vendors and hardware, such as: HP, Red Hat, IBM and Dell.
However, the vast majority of Linux distributions, including those developed by members of the Free Standards Group, do not follow this proposed standard. In particular, paths, expressly created by the FHS editors, such as /srv/
, are not widely used. Some Linux systems reject FHS in favor of a different approach, such as GoboLinux.
Since FHS began as a Linux initiative, other UNIX-derived operating systems have generally ignored it in favor of their own systems, which sometimes vary widely. For example, Mac OS X uses names such as /Applications/
, /Library
, and /Users/
along with the traditional UNIX directory hierarchy.
Directory structure
On UNIX and similar systems such as BSD, GNU/Linux, all files and directories appear under the root directory, /
, even if they are on different physical devices.
Most of these directories exist on all UNIX-like operating systems, and are generally used in the same way; however, the descriptions presented here are those that are specifically used by the FHS, and are not considered mandatory by other GNU/Linux platforms.
General directory structure
In the UNIX (and similar) file system, there are several sub-hierarchies of directories that serve multiple and different storage and organization functions throughout the system. These directories can be categorized into:
- Static: Contains files that do not change without the admin (root) intervention, however, they can be read by any other user. (
/bin, /sbin, /opt, /boot, /usr/bin
...) - Dynamics: Contains files that are changing, and can be read and written (some only by their respective user and root).
- They contain configurations, documents, etc. For these directories, it is recommended a backup often, or better yet, should be mounted on a separate partition on the same disk, such as, for example, mounting the /home directory on another partition of the same disk, independent of the main partition of the system; thus, the system can be repaired without affecting or erasing the documents of the users. (
/var/mail, /var/spool, /var/run, /var/lock, /home
...)
- Shared: Contains files that can be found on one computer and used on another, or even shared between users.
- Restricted: Contains files that cannot be shared, they are only modified by the administrator. (
/etc, /boot, /var/run, /var/lock
...)
Specifying the directories defined by FHS
Directory | Simple |
---|---|
/ | Primary hierarchyroot or root, and root directory or container of the entire hierarchy system. |
/bin/ | Command binary applications that are essential for them to be available for a session user, or for all users (multiusuario). Include, for example, cat, ls, cp, rm, mkdir, etc. |
/boot/ | Boot loader files (e.g. cores, initrd). Often in a separate partition or disk. |
/dev/ | It contains special block files and characters associated with hardware devices. Here we find all the physical devices of the system (all our hardware). |
/etc/ | Contains system-specific configuration files Host system-wide. There has been controversy over the meaning of the name, in the first versions of the UNIX Implementation Document of Bell laboratories, /etc is known as the directory /etcetra, everything that this directory historically considered did not belong elsewhere (however, restrict the ESF / etc to static configuration files and cannot contain binary files). Since the publication of early documentation, the name of the guide has been re-designed in several ways. Latest interpretations include Backronyms as "Editable Text Settings." |
| Settings files for hosted programs within the directory /opt .
|
| Settings for the X Window System, version 11. |
| Settings for SGML. |
| Settings files for XML. |
/home/ | It contains the working directories of all users, except that of the superuser (administrator, root). It contains saved files, personal settings, etc. It is often installed on a separate disk or partition. Each user has their own directory within this folder. |
/lib/ | It contains all libraries (bad translated as bookshops) essential shared of hosted programs, i.e. for binaries in /bin/ and /sbin/ . It also contains libraries for the core.
|
/media/ | Contains the assembly points of removable storage media, such as CD-ROM readers (appeared in version 2.3 of FHS), Pendrives (memoria USB), and even serves for riding other partitions of the same hard drive, such as, for example, some partition that is used by another operating system. |
/mnt/ | File system temporarily mounted. It's a directory like that. /media , but it is mostly used by users. Serve for riding hard drives and partitions temporarily on the system; you do not need password, unlike the directory /media .
|
/opt/ | It contains optional program packages for static applications, that is, they can be shared among users. Such applications do not keep their settings in this directory; in this way, each user may have a different configuration of the same application, so that the application is shared, but not the configurations of the users, which are saved in their respective directory in /home .
|
/proc/ | Mainly contains text files, virtual file system that document the kernel and process status in text files (e.g., uptime, network ).
|
/root/ | root directory of the root user. Works like folders in /home , but in this case, it is only for the superuser (system manager).
|
/sbin/ | System of essential binaries, commands and exclusive programs of the superuser (root), for example init, route, ifup). A user can run one of these command applications, if you have sufficient permissions, or if you have the password of the superuser. |
/srv/ | Specific data location that are served by the system. |
/sys/ | Process evolution. Virtual file system that document the kernel, but located in a hierarchical way. They are available in an anarchic way. Your right name is Sysfs. |
/tmp/ | Temporary Archives (see also /var/tmp). Here are usually saved temporary files – for example – by the internet browser. |
/usr/ | Secondary hierarchy of user data; contains most of the utilities and multiuser applications, that is, accessible to all users. In other words, it contains the shared files, but they are nonetheless only reading. This directory can even be shared with other local network computers. |
| Non-administrative binary commands for all users. They are read-only, but they can have their own settings for each user in /home .
|
| Header files (Header files or Include files), that is, standard inclusion files. |
| shared libraries of binaries in /usr/bin/ . Some executables share the same bookstores that share the other applications, so that there are usually no two identical bookstores in the same system, which saves memory and provides more order.
|
| Non-essential binary system; for example, demons for various network services. That is, it contains programs that do not provide a user interface and are usually executed at the beginning of the system or in certain circumstances. They are not directly managed by the user while running, although they can be configured before they are executed. |
| Independent and shared architecture of data. In other words, it contains shared data that does not depend on the architecture of the system. This may include images, sounds, etc., for system availability and applications. They can be templates, for example, although they are usually files that the system uses directly. |
| Source codes of some applications. Like /mnt , this folder is managed by users directly so that they can save in it the source code of programs and libraries and so they can easily access it, without problems with permissions. It allows the source code to have its own, accessible but remote space of all users.
|
| X Window System, Version 11, Release 6. This directory is related to the graphic environment. |
| Tertiary hierarchy for local data, specific to this host. He usually has subdirectories, for example bin/ , lib/ , share/ , data sharing only reading specifics of the computer or server that shares them.
|
/var/ | Variable files, such as logs, files spool, databases, temporary email files, and some temporary files in general. It usually acts as a record of the system. Helps find the origins of a problem. |
| Cache memory of applications, although the directory is also used /tmp for the same.
|
| Data and information are deposited, concerning the fall or errors of the operating system. It's more specific than /var in general.
|
| Variable data of the system games. This directory is not essential and is often omitted by the games applications themselves, as they use the user folder in /home to save variable data such as configurations, for example. Anyway, gnome games use this directory.
|
| Archives Lock. Archives that track the resources currently used. |
| Registration files, Log. Several records, logs. |
| Mailbox or messages from users. If you do not use encryption, then the personal folder is usually used for the same work by programs that handle emails. |
| It has the variable data of /opt. |
| Recent information. It deals with system operation from the last start. For example, users currently registered or logged, who have entered, and demons that are in execution. |
| Coils or reels (Spool), of tasks pending processing (e.g., unread print and mail lines). |
| Location of unapproved user emails. If you do not use encryption, then the personal folder is usually used for the same work by programs that handle emails. |
| Temporary files that, unlike /tmp , they are not erased between sessions or reboots of the system, but they are still dispensable anyway.
|
Conceptual map that exemplifies a UNIX-like system, with its disks, partitions and some directories (subhierarchies).
Gray arrows point to directories that are not on the same hard drive or partition as the root (/) directory, yet are part of the same hierarchy.
UNIX-like systems typically require a minimum of two partitions to function (/ and swap). However, in the example, the /home directory (or sub-hierarchy) also has its own partition on disk. This means that the system can be reinstalled without users losing their personal settings and documents, however a dedicated /home partition is optional.
The swap partition is not assigned any directory in the hierarchy, since its purpose is to serve the system with swap space that is used when RAM is full.
The map also shows a removable disk (perhaps a flash drive), which is not essential for the system. This removable disk has a directory inside the /media directory; everything that is saved in that directory (/media/disk) will be saved on that removable disk. Even any sub-hierarchy, even the hierarchy itself, can be saved to a removable disk, instead of a hard drive.
For example: the /tmp sub-hierarchy can be mounted on another disk or another partition on the same disk, just like any other directory in the hierarchy, or even on the same swap partition. On UNIX-like systems, any directory (sub-hierarchy) can have its own disk or partition assigned to it. Note that all disks, partitions, devices and terminals that the kernel recognizes can be monitored or identified through some special files present in the /dev sub-hierarchy.
Contenido relacionado
IEEE 1394
Single user
Datatype