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
複製代碼
相關文章
相關標籤/搜索