A, Linux directory structure:
Two, Linux directory structure and naming conventions:
Linux file system hierarchy follows: LSB ( Linux Standard Base ), that is the root " / " Start inverted tree structure, refer to FHS ( Filesystem Hierarchy Standard ) official documents http://www.pathname.com/fhs/
1. /boot
Boot file storage directory, kernel file (vmlinuz) , the boot loader (bootloader, grub) are stored in this directory , the directory directly affect the Linux system can start properly
2. /bin
All basic commands used by the user; can not be associated to a separate partition, OS startup program that is will be used
3. /sbin
Management of basic commands; can not be associated to a separate partition, OS startup program that is will be used
4. /lib
When you start the program depends on the basic shared libraries and kernel module files (/ lib / modules)
5. /lib64
专用于x86_64系统上的辅助共享库文件存放位置
6. /etc
配置文件目录
7. /home/USERNAME
普通用户家目录,例如新建一个yang的用户,家目录就是/home/yang
8. /root
管理员(root用户)的家目录
9. /media
便携式移动设备挂载点,例如将光盘或优盘挂在到这个目录里
10. /mnt
临时文件系统挂载点,上面说的光盘和优盘也可挂在到这个目录
11. /dev
设备文件及特殊文件存储位置,例如第一块硬盘就是/dev/sda
12. /opt
第三方应用程序的安装位置
13. /srv
系统上运行的服务用到的数据
14. /tmp
临时文件存储位置
15. /usr
universal shared, read-only data(通用共享,只读数据),其下又有几个目录:
(1) /usr/bin
保证系统拥有完整功能而提供的应用程序
(2) /usr/sbin
与/sbin相同,管理类的基本命令
(3) /usr/lib
存放32位库文件
(4) /usr/lib64
存放64位库文件
(5) /usr/include
C程序的头文件(header files)
(6) /usr/share
结构化独立的数据,例如doc, man等
(7) /usr/local
第三方应用程序的安装位置,其下也有类似bin, sbin, lib, lib64, etc, share等目录
16. /var
variable data files(可变数据文件),其下也有一些目录:
(1) /var/cache
应用程序缓存数据目录
(2) / var / lib
Application state information data
(3) /var/local
It is dedicated to the / usr / local application program stored in the variable data
(4) / was / cap
Lock file
(5) / var / log
Log directory and file
(6) / var / opt
It is dedicated to the / opt application is stored in the variable data
(7) / var / run
Running processes related data , typically used to store process pid file
(8) / var / spool
Application data pool
(9) / var / tmp
Temporary data generated between the restart system twice
17. /proc
A virtual file system output kernel and process information related to
18. /sys
For outputting information on system hardware virtual file system is currently
19. /selinux
Enhanced Linux Security , SELinux -related information such as security policy storage location