Linux 目录结构 持续更新中。。。。

来源:互联网 发布:c语言判断闰年 编辑:程序博客网 时间:2024/06/05 05:26

FHS defines two independent distinctions among files: shareable** vs****. unshareable**** and *variable vs. static.*
“Shareable” files are those that can be stored on one host and used on others. “Unshareable” files are those that are not shareable. For example, the files in user home directories are shareable whereas device lock files are not.
“Static” files include binaries, libraries,documentation files and other files that do not change without sywtem administratior intervention. “Variable” files are files that are not static.
Here is an example of a FHS-compliant system.
~~~~~~~~~~~~~~~~~~~~~~~~~~~
————shareable—————unshareable–
static /usr, /opt /etc, /boot
variable /var/mail /var/run /var/lock
~~~~~~~~~~~~~~~~~~~~~~~~~~~
1. /bin: Essential user command binaries(for use by all users)
/bin contains commands that may be used by both the system administrator and by users, but which are required when no other filesystems are mounted(e.g. in single user mode). It may also contain commands which are used indirectly by scripts. There must be no subdirectories in /bin.
2. /sbin: System binaries
Utilities used for system administration(and other root-only commands) are stored here.
/sbin contains binaries essential for booting, restoring, recovering, and/or repairing the system in additon to the binaries in /bin.
3. /usr/bin:Most user commands
This is the primary directory of executable commands on the system
4. /usr/sbin
/usr/sbin is generally used for **Programs
executed after.**
5. /usr/local/sbin
Locally-installed system administation programs.
6. /boot: Static files of the boot loader
This directory contains everything required for the boot process except configuration files not needed at boot time and the map installer. Thus /boot stores data that is used before the kernel begins executing user-mode programs. This may include saved master boot sectors and sector map files.
The operating system kernel must be located in either / or /boot.
7**. /dev**: Device files
The /dev director is the location for special or device files.
8. /etc: Host-specific system configuration
It contains configurationfiles of program operations. It must be static and cannot be an executable binary.
**/etc/fstab: 开机自动挂载磁盘root
/etc/hosts: 主机名配置文件,相当于本地lan的DNS
/etc/inittab: 初始化系统的配置文件
/etc/issue: 打印系统和内核版本
/etc/passwd:账户信息文件 uid 和 gid
/etc/shadow:密码信息文件
/etc/sudoers:sudo提权配置文件
/etc/profile:环境变量放置位置
/etc/resolv.conf:DNS的配置文件
/etc/services:网络服务端口
/etc/rsslog.conf:日志的配置文件
/etc/motd:登入提示信息的编辑文件
/etc/groups:设定用户和用户组信息文件
/etc/sysconfig/network:修改机器名
/etc/rc.local: 存放开机自启动程序命令文件chkconfig
/etc/securety:设定哪些终端可以root登录
/etc/sysconfig/network-scripts/ifcfg-eth0:网络配置**
9. /home: User home directories
10. /lib: Essential shared libraries and kernel modules
It 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.
11. /media: Mount point for removeable media
12. /mnt: Mount point for a temporarily mounted filesystem
13. /root: Home directory for the root user
14. /usr 是存放unix系统商开发的程序
15. /opt :Add-on application software packages即第三方开发的程序
16. /proc:虚拟文件系统
cat /proc/cpuinfo /proc/meminfo /proc/loadavg可显示负载繁忙程度。此目录的数据都在内存中,如系统核心,外部设备,网络状态,由于数据都存放于内存中,所以不占用磁盘空间,比较重要的目录有/proc/cpuinfo、/proc/interrupts、/proc/dma、/proc/ioports、/proc/net/*等
17. /srv: Data for services provided by this system
18. /tmp: Temporary files
19. /var:
Contains variable data files, including spool directories and ifles, administrative and logging data, and transient and temporary files.
/var/log/message:所有的登录文件存放目录
/var/spool/mail:邮件存放的目录
20. /lost+found:
当系统以为崩溃时,会产生碎片文件在里面
21. /root/.bashrc中定义了alias

0 0
原创粉丝点击