当前位置:网站首页>Filesystem Hierarchy Standard

Filesystem Hierarchy Standard

2022-08-11 08:08:00 OopspoO

Filesystem Hierarchy Standard

文件系统层次结构标准(英语:Filesystem Hierarchy Standard,FHS)定义了Linux操作系统中的主要目录及目录内容。FHS由Linux基金会维护。 当前版本为3.0版,于2015年发布。

文档内容不多,英文内容差不多50页,可以很快阅读一遍。

先看下摘要:

This standard consists of a set of requirements and guidelines for file and directory placement under UNIX-like
operating systems. The guidelines are intended to support interoperability of applications, system administration tools,
development tools, and scripts as well as greater uniformity of documentation for these systems.

大体意思就是说要为UNIX-like的系统确定一个文件和目录位置的规范。

接下来文章分成以下几部分:

  1. 根文件系统——The Root Filesystem
    规定了根目录下需要有那些目录文件。
    下面的目录(无论是不是链接)都需要在根目录下存在:
目录描述
binEssential command binaries
bootStatic files of the boot loader
devDevice files
etcHost-specific system configuration
libEssential shared libraries and kernel modules
mediaMount point for removable media
mntMount point for mounting a filesystem temporarily
optAdd-on application software packages
runData relevant to running processes
sbinEssential system binaries
srvData for services provided by this system
tmpTemporary files
usrSecondary hierarchy
varVariable data
  1. /usr目录结构——The /usr Hierarchy
    规定了usr目录下需要有哪些文件。
    需要注意的是**/usr不是user的缩写,其实usr是Unix Software Resource的缩写, 也就是Unix操作系统软件资源所放置的目录,而不是用户的数据;所有系统默认的软件都会放置到/usr, 系统安装完时,这个目录会占用最多的硬盘容量**

  2. /var目录结构——The /var Hierarchy
    规定了var目录下需要有哪些文件.
    /var 包含系统一般运行时要改变的数据。通常这些数据所在的目录的大小是要经常变化或扩充的。

  3. 操作系统其他的一些特定组件

reference

https://refspecs.linuxfoundation.org/

原网站

版权声明
本文为[OopspoO]所创,转载请带上原文链接,感谢
https://blog.csdn.net/cclethe/article/details/125214464