Linux file directory function

Overview

As an open source operating system, Linux also follows FHS (English: Filesystem Hierarchy Standard Chinese: Filesystem Hierarchy Standard), which can make file management clearer.

File system directory

Early Linux strictly abides by the FHS specifications. There are the following /bin,/boot,/dev,/etc,/home,/lib,/lib64,/media,/mnt,/opt,/proc, under the system root partition. /root,/run,/sbin,/srv,/sys,/tmp,/usr,/var directories. However, with the continuous development of the system, release vendors and the community have found that some directories have similar functions, and they can be combined. For example, /lib, /lib64, /sbin and /bin
lib mainly put library files. These library files can be called by the system or application programs. When bin started, it was a strict distinction between the system program and the system management program and the user. Now this distinction has been weakened.
Linux file directory function
The directory structure of this Centos8 can be seen that the original directory has become a link file.

Specific directory division

Let's take a look at the standard FHS catalog function distinction.

/bin 这个目录是包含所有的管理员和用户都可以用到程序,同时也包含了单用户模式下可以用的程序。
/boot 这个目录包含了系统启动所需要的启动引导文件和内核文件
/dev 这个目录比较特殊,这个目录仅包含设备文件
/etc  系统的配置文件大部分都在此目录内
/opt  额外安装的软件包的位置
/home 所有普通用户的默认家目录的位置
/lib   共享的库文件或者是内核级别的库文件
/lib64  64位的库文件
/meida 作为可移动存储介质挂载的目录
/mnt   作为临时的挂载点
/root  root超级用户的家目录
/srv   提供特定服务存放的目录
/tmp  临时文件存放的目录
/usr  这个目录作为第二大文件系统,这个目录存放可以用共享的只读数据。
/usr/bin 用户最多命令存放位置
/usr/lib 程序或者库文件存放目录
/usr/lib64  64位程序存放的位置
/usr/sbin 非必须的标准的程序
/var 这个目录中存放着那些不断在扩充着的东西,为了保持/usr的相对稳定,那些经常被修改的目录能够放在这个目录下,实际上许多系统管理员都是这样干的。系统的日志文档就在/var/log目录中
/proc  这个是内存虚拟文件的挂载点,在必要时候可以与内核进行交互。
/sys   内存中的映像挂载点
/run  存放系统PID文件的目录

to sum up

The current Linux file system generally follows the FHS standard, but the respective distributions will have more or less differences below the secondary directory.

references

FHS standard FHS2.3 standard

Guess you like

Origin blog.51cto.com/15131458/2677851