Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
en:project:fhs [2018/10/11 07:36]
emulatorman
en:project:fhs [2023/08/03 02:26]
emulatorman [Directory structure]
Line 1: Line 1:
-====== About ======+====== Filesystem Hierarchy Standard ======
  
-//The **Filesystem Hierarchy Standard** (FHS) defines the main directories and their contents in GNU/Linux and other Unix-like computer operating systems.//+The **Filesystem Hierarchy Standard** (FHS) defines the main directories and their contents in GNU/Linux and other Unix-like computer operating systems.
  
 ===== Overview ===== ===== Overview =====
Line 16: Line 16:
 All files and directories appear under the root_directory "/", even if stored on different physical devices. All files and directories appear under the root_directory "/", even if stored on different physical devices.
  
-A description of the hierarchy specified in the FHS+A description of the hierarchy specified in the FHS:
  
-**/bin/**+{| border="1" style="sortable; text-align: left; width: 100%; border-collapse:collapse; color:#262627; background-color:#f8f9fa;" 
 +! style="background-color:#eaecf0" |Directory 
 +! style="background-color:#eaecf0" |Description 
 +|- 
 +|/bin 
 +|Essential user command binaries. 
 +|- 
 +|/boot 
 +|Static files of the boot loader 
 +|- 
 +|/dev 
 +|Device files 
 +|- 
 +|/etc 
 +|Host-specific system configuration 
 +|- 
 +|/etc/local 
 +|Host-specific system configuration for Local binaries 
 +|- 
 +|/etc/opt 
 +|Host-specific system configuration for Add-on application software packages 
 +|- 
 +|/home 
 +|User home directories 
 +|- 
 +|/lib 
 +|Essential shared libraries 
 +|- 
 +|/libexec 
 +|Essential binaries run by other programs (BSD descendant systems only) 
 +|- 
 +|/lib/modules 
 +|Loadable kernel modules (monolitic kernel package only) 
 +|- 
 +|/lib32 
 +|Essential shared libraries for 32bit binaries (multilib packages only) 
 +|- 
 +|/media 
 +|Mount point for removable media 
 +|- 
 +|/mnt 
 +|Mount point for temporarily mounted filesystem / Mount point for mounting a filesystem temporary 
 +|- 
 +|/opt 
 +|Add-on application software packages 
 +|- 
 +|/proc 
 +|Kernel and process information virtual filesystem (mounted with procfs) 
 +|- 
 +|/root 
 +|Home directory for the root user 
 +|- 
 +|/run 
 +|Run-time variable data / Data relevant to running processes 
 +|- 
 +|/sbin 
 +|Essential system command binaries 
 +|- 
 +|/srv 
 +|Data for services provided by this system 
 +|- 
 +|/sys 
 +|Kernel and system information virtual filesystem (Linuxkernel only; mounted with sysfs) 
 +|- 
 +|/tmp 
 +|Temporary files (mounted with tmpfs) 
 +|- 
 +|/usr 
 +|Secondary hierarchy 
 +|- 
 +|/usr/bin 
 +|Most user command binaries 
 +|- 
 +|/usr/games 
 +|Games and educational binaries 
 +|- 
 +|/usr/include 
 +|Directory for standard include files / Header files included by program languages 
 +|- 
 +|/usr/lib 
 +|Shared libraries 
 +|- 
 +|/usr/lib/games 
 +|Shared libraries for game binaries 
 +|- 
 +|/usr/lib32 
 +|Shared libraries for 32bit binaries (multilib packages only) 
 +|- 
 +|/usr/lib32/games 
 +|Shared libraries for 32bit game binaries (multilib packages only) 
 +|- 
 +|/usr/libexec 
 +|Binaries run by other programs 
 +|- 
 +|/usr/local 
 +|Local hierarchy (for personal installation only) 
 +|- 
 +|/usr/local/bin 
 +|Local user binaries 
 +|- 
 +|/usr/local/games 
 +|Local games and educational binaries 
 +|- 
 +|/usr/local/include 
 +|Local directory for standard include files / Local header files included by program languages 
 +|- 
 +|/usr/local/lib 
 +|Local shared libraries 
 +|- 
 +|/usr/local/lib/games 
 +|Local shared libraries for game binaries 
 +|- 
 +|/usr/local/lib32 
 +|Local shared libraries for 32bit binaries (multilib packages only) 
 +|- 
 +|/usr/local/lib32/games 
 +|Local shared libraries for 32bit game binaries (multilib packages only) 
 +|- 
 +|/usr/local/libexec 
 +|Local binaries run by other programs 
 +|- 
 +|/usr/local/sbin 
 +|Local system binaries 
 +|- 
 +|/usr/local/share 
 +|Local architecture-independent data 
 +|- 
 +|/usr/local/share/doc 
 +|Local miscellaneous documentation (documentation packages only) 
 +|- 
 +|/usr/local/share/games 
 +|Local static data files for game binaries 
 +|- 
 +|/usr/local/share/info 
 +|Local primary directory for GNU Info system (texinfo package only) 
 +|- 
 +|/usr/local/share/man 
 +|Local online manuals / Local manual pages 
 +|- 
 +|/usr/local/share/misc 
 +|Local miscellaneous architecture-independent data 
 +|- 
 +|/usr/local/src 
 +|Local source code (source code packages only) 
 +|- 
 +|/usr/sbin 
 +|Non-vital system command binaries 
 +|- 
 +|/usr/share 
 +|Architecture-independent data 
 +|- 
 +|/usr/share/doc 
 +|Miscellaneous documentation (documentation packages only) 
 +|- 
 +|/usr/share/games 
 +|Static data files for game binaries 
 +|- 
 +|/usr/share/info 
 +|Primary directory for GNU Info system (texinfo package only) 
 +|- 
 +|/usr/share/man 
 +|Online manuals / Manual pages 
 +|- 
 +|/usr/share/misc 
 +|Miscellaneous architecture-independent data 
 +|- 
 +|/usr/src 
 +|Source code (source code packages only) 
 +|- 
 +|/var 
 +|Variable data 
 +|- 
 +|/var/cache 
 +|Application cache data 
 +|- 
 +|/var/crash 
 +|Kernel crash dumps (Linuxkernels not supported) 
 +|- 
 +|/var/games 
 +|Variable game data 
 +|- 
 +|/var/lib 
 +|Variable state information 
 +|- 
 +|/var/lib/misc 
 +|Miscellaneous state data 
 +|- 
 +|/var/local 
 +|Variable data for Local binaries 
 +|- 
 +|/var/lock 
 +|Lock files 
 +|- 
 +|/var/log 
 +|Log files 
 +|- 
 +|/var/mail 
 +|User mailbox files 
 +|- 
 +|/var/opt 
 +|Variable data for Add-on application software packages 
 +|- 
 +|/var/spool 
 +|Application spool data 
 +|- 
 +|/var/tmp 
 +|Temporary files preserved between system reboots 
 +|}
  
-Essential command executable (**bin**aries) for all users (e.g., cat, ls, cp) +<note> 
- +The term "essential" refers from /sbin and /bin and everything over / and not /usr 
-(especially files required to boot or rescue the system)  +</note>
- +
-**/boot/** +
- +
-Boot loader, kernels and initrd files  +
- +
-**/dev/** +
- +
-**Dev**ices files (e.g., :/dev/null)  +
- +
-**/etc/** +
- +
-Host-specific system-wide configuration files (from **et** **c**etera)  +
- +
-**/home/** +
- +
-Users' **home** directories  +
- +
-**/lib/** +
- +
-**Lib**raries essential for the binaries in /bin/ and /sbin+
- +
-(library required to boot or rescue the system)  +
- +
-**/lost+found/** +
- +
-Some files and fragment that were "recovered" during the previous fsck (Not part of FHS)  +
- +
-**/mnt/** +
- +
-Temporarily **m**ou**nt**ed filesystems  +
- +
-**/media/** +
- +
-Mount points for removable **media** such as CD-ROMs (appeared in FHS-2.3)  +
- +
-**/opt/** +
- +
-Add-on application software packages +
- +
-Pre-compiled, non Hyperbola binary distribution (tar'ed..) goes here. +
- +
-  * /opt/bin/ : Same as for top-level hierarchy +
-  * /opt/include/ : Same as for top-level hierarchy +
-  * /opt/lib/ : Same as for top-level hierarchy +
-  * /opt/sbin/ : Same as for top-level hierarchy +
-  * /opt/share/ : Same as for top-level hierarchy  +
- +
-**/proc/** +
- +
-Virtual filesystem documenting kernel and **proc**ess status, mostly text files (e.g., uptime, network)  +
- +
-**/root/** +
- +
-Home directory for the **root** user  +
- +
-**/sbin/** +
- +
-System administrative binaries (e.g., init, route, ifup) (**s**ystem **bin**aries) +
- +
-(files required to boot or rescue the system)  +
- +
-**/tmp/** +
- +
-**T**e**mp**orary files  +
- +
-**/selinux/** +
- +
-SE-Linux runtime settings (Not part of FHS).  +
- +
-**/srv/** +
- +
-Site-specific data which is **s**e**rv**ed by the system (Not part of FHS).  +
- +
-**/sys/** +
- +
-**The** filesystem for exporting kernel objects. +
- +
-(many /proc/* files should have been here...)  +
- +
-**/usr/** +
- +
-Secondary hierarchy for shareable, read-only data (formerly from **U**NIX **s**ource **r**epository, now from **U**NIX **s**ystem **r**esources) +
- +
-(files that are **not**-required to boot or rescue the system) +
- +
-  * /usr/bin/ : Same as for top-level hierarchy +
-  * /usr/include/ : Standard **include** files +
-  * /usr/lib/ : Same as for top-level hierarchy +
-  * /usr/libexec/ : **Lib**raries that are not intended to be **exec**uted directly by users or shell scripts. +
-  * /usr/sbin/ : Same as for top-level hierarchy +
-  * /usr/share/ : Architecture-independent (**share**d) data +
-  * /usr/src/ : **S**ou**rc**e code (to build Hyperbola packages. see also /usr/local/src/+
-  * /usr/X11R6/ : **X** Window System, Version **11 R**elease **6** +
-  * /usr/local/ : Tertiary hierarchy for local data installed by the system administrator +
-  * /usr/local/bin : locally compiled binaries, local shell script, etc. +
-  * /usr/local/src : **S**ou**rc**e code (place where to extract and build non debian'ized stuffs) +
- +
-<note important>For [[https://www.gnu.org/software/hurd/faq/slash_usr_symlink.html|historical reasons]], GNU/Hurd does not include **/usr/** by default. However, Hyperbola will include **/usr/** for its version of GNU/Hurd to ease the development and porting with other Unix-like computer operating systems.</note> +
- +
-**/var/** +
- +
-**Var**iable data, such as logs, databases, websites, and temporary spool (e-mail..) files+
  
 ===== Acknowledgement ===== ===== Acknowledgement =====
  
 This wiki article is based on **DebianWiki**. We may have removed non-[[https://www.gnu.org/philosophy/free-system-distribution-guidelines.html|FSDG]] bits from it. This wiki article is based on **DebianWiki**. We may have removed non-[[https://www.gnu.org/philosophy/free-system-distribution-guidelines.html|FSDG]] bits from it.