FHS - Filesystem Hierarchy Standard
====================================================================================
FHS as defined by RedHat:
------------------------------------------------------------------------------------------------------------------------------------------------
/boot/
The /boot/ directory contains static files required to boot the system, such as the Linux kernel. These files are essential for the system to boot properly.
------------------------------------------------------------------------------------------------------------------------------------------------
/dev/
The /dev/ directory contains file system entries which represent devices that are attached to the system. These files are essential for the system to function properly.
------------------------------------------------------------------------------------------------------------------------------------------------
/etc/
The /etc/ directory is reserved for configuration files that are local to the machine. No binaries are to be placed in /etc/.
------------------------------------------------------------------------------------------------------------------------------------------------
/lib/
The /lib/ directory should contain only those libraries needed to execute the binaries in /bin/ and /sbin/. These shared library images are particularly important for booting the system and executing commands within the root file system.
------------------------------------------------------------------------------------------------------------------------------------------------
/media
The /media/ directory contains subdirectories used as mount points for removeable media, such as 3.5 diskettes, CD-ROMs, and Zip disks.
------------------------------------------------------------------------------------------------------------------------------------------------
/mnt/
The /mnt/ directory is reserved for temporarily mounted file systems, such as NFS file system mounts. For all removeable media, use the /media/ directory.
------------------------------------------------------------------------------------------------------------------------------------------------
/opt/
/opt/ directory provides storage for large, static application software packages./opt/ directory creates a directory bearing the same name as the package. This directory, in turn, holds files that otherwise would be scattered throughout the file system, giving the system administrator an easy way to determine the role of each file within a particular package.sample is the name of a particular software package located within the /opt/ directory, then all of its files are placed in directories inside the /opt/sample/ directory, such as /opt/sample/bin/ for binaries and /opt/sample/man/ for manual pages.------------------------------------------------------------------------------------------------------------------------------------------------
/proc/
The /proc/ directory contains special files that either extract information from or send information to the kernel.
------------------------------------------------------------------------------------------------------------------------------------------------
/sbin/
The /sbin/ directory stores executables used by the root user. The executables in /sbin/ are only used at boot time and perform system recovery operations. Of this directory, the FHS says:
/sbincontains binaries essential for booting, restoring, recovering, and/or repairing the system in addition to the binaries in/bin. Programs executed after/usr/is known to be mounted (when there are no problems) are generally placed into/usr/sbin. Locally-installed system administration programs should be placed into/usr/local/sbin.
------------------------------------------------------------------------------------------------------------------------------------------------
/srv/
The /srv/ directory contains site-specific data served by your system running Red Hat Enterprise Linux. This directory gives users the location of data files for a particular service, such as FTP, WWW, or CVS. Data that only pertains to a specific user should go in the /home/ directory.
------------------------------------------------------------------------------------------------------------------------------------------------
/sys/
The /sys/ directory utilizes the new sysfs virtual file system specific to the 2.6 kernel. With the increased support for hot plug hardware devices in the 2.6 kernel, the /sys/ directory contains information similarly held in /proc/, but displays a hierarchical view of specific device information in regards to hot plug devices.
------------------------------------------------------------------------------------------------------------------------------------------------
/usr/
The /usr/ directory is for files that can be shared across multiple machines. The /usr/ directory is often on its own partition and is mounted read-only.
/usr/local
The /usr/local hierarchy is for use by the system administrator when installing software locally. It needs to be safe from being overwritten when the system software is updated. It may be used for programs and data that are shareable among a group of hosts, but not found in /usr.
------------------------------------------------------------------------------------------------------------------------------------------------
/var/
Since the FHS requires Linux to mount /usr/ as read-only, any programs that write log files or need spool/ or lock/ directories should write them to the /var/ directory. The FHS states /var/ is for:
...variable data files. This includes spool directories and files, administrative and logging data, and transient and temporary files.
------------------------------------------------------------------------------------------------------------------------------------------------
No Comments