linux-文件系统-层次结构

文件系统:层级结构
FHS:FlieSystem Hierarchy Standrand  linux文件系统标准 http://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html


/bin : Essential user command binaries (for use by all users) 全部用户可用的基本命令程序 
/sbin: System binaries 管理系统程序
/boot: Static files of the boot loader引导加载器必须用到的各静态文件:kernel,initramfs,grub;
/dev: Device files 设备文件或特殊文件 设备有两种类型:字符设备(键盘,显示器),块设备(硬盘 内存)
/etc:Host-specific system configuration 系统程序静态配置文件
/home : User home directories (optional) 普通用户的家目录
/root:Home directory for the root user (optional) 管理员的家目录
/lib: Essential shared libraries and kernel modules 共享库和内核模块
The /lib directory contains those shared library images needed to boot the system and run the commands in the root filesystem, **ie. by binaries in /bin and /sbin.**
/lib:64位共享库
/media:Mount point for removable media 便携式设备挂载点 软盘 U盘
/mnt:其余文件系统的临时挂载点 ex:新的硬盘
/opt:Add-on application software packages  第三方应用程序 可选路径(但不是全部程序都装在这里)
/srv:Data for services provided by this system 当前主机为服务提供的数据
/tmp:Temporary files 临时文件 为那些会产生临时文件的程序提供用于存储临时文件的目录 可供全部用户执行写入操做 有特殊权限

/usr:The /usr Hierarchy 
/usr is the second major section of the filesystem. /usr is shareable, read-only data. That means that /usr should be shareable between various FHS-compliant hosts and must not be written to. Any information that is host-specific or varies with time is stored elsewhere.
全局共享的只读数据路径;
bin,sbin,
lib,lib64
include:C程序头文件
share:命令手册
local:另外一个层级目录
X11R6:X-window程序的安装位置
src:程序源码文件
/usr/local: 管理员安装本地应用程序 也一般用于安装第三方程序


/var:
/var contains variable data files. 存储常常发生变化的文件
**This includes spool directories and files, administrative and logging data, and transient and temporary files.**


cache	Application cache data
lib	    Variable state information
local	Variable data for /usr/local
lock	Lock files
log	    Log files and directories
opt	    Variable data for /opt
run	    Data relevant to running processes
spool	Application spool data
tmp	    Temporary files preserved between system reboots

/var/backups
    /var/cron
    /var/msgs
    /var/preserve



/proc:基于内存的虚拟文件系统, 为内核及进程存储相关信息 它们多为内核参数 ex:内核参数 net.ipv4.network的参数抽象为net/ipv4/network的文件目录 
/sys: 为sysfs虚拟文件系统提供一种比proc更为理想的访问内核数据的途径
其主要做用在于为管理linux设备提供统一管理的接口

https://developer.ibm.com/technologies/linux/



CentOS的镜像:
http://mirrors.aliyun.com
http://mirrors.163.com
http://mirrors.sohu.com
复制代码
相关文章
相关标签/搜索