Brief introduction of Linux file directory and color difference of files
- 2020-06-23 02:34:49
- OfStack
This article is mainly about the Linux file directory introduction and file color differences related content, specific as follows.
The color of the file represents the meaning
Blue is the directory;
Green is for executable files;
Red for compressed files;
Light blue for link files;
White for other files;
Yellow is the device file, block, char, fifo.
Common catalog interpretation
The directory structure of the various Linux distributions is basically 1. Each directory is briefly described as follows:
目录 |
描述 |
/ |
根目录 |
/bin |
做为基础系统所需要的最基础的命令就是放在这里。比如 ls、cp、mkdir等命令;功能和/usr/bin类似,这个目录中的文件都是可执行的,普通用户都可以使用的命令。 |
/boot |
Linux的内核及引导系统程序所需要的文件,比如 vmlinuz initrd.img 文件都位于这个目录中。在1般情况下,GRUB或LILO系统引导管理器也位于这个目录;启动装载文件存放位置,如kernels,initrd,grub。1般是1个独立的分区。 |
/dev |
1些必要的设备,声卡、磁盘等。还有如 /dev/null. /dev/console /dev/zero /dev/full 等。 |
/etc |
系统的配置文件存放地. 1些服务器的配置文件也在这里;比如用户帐号及密码配置文件; /etc/opt:/opt对应的配置文件 /etc/X11:Xwindows系统配置文件 /etc/xml:XML配置文件 …… |
/home |
用户工作目录,和个人配置文件,如个人环境变量等,所有的账号分配1个工作目录。1般是1个独立的分区。 |
/lib |
库文件存放地。bin和sbin需要的库文件。类似windows的DLL。 |
/media |
可拆卸的媒介挂载点,如CD-ROMs、移动硬盘、U盘,系统默认会挂载到这里来。 |
/mnt |
临时挂载文件系统。这个目录1般是用于存放挂载储存设备的挂载目录的,比如有cdrom 等目录。可以参看/etc/fstab的定义。 |
/opt |
可选的应用程序包。 |
/proc |
操作系统运行时,进程(正在运行中的程序)信息及内核信息(比如cpu、硬盘分区、内存信息等)存放在这里。/proc目录伪装的文件系统proc的挂载目录,proc并不是真正的文件系统,它的定义可以参见 /etc/fstab 。 |
/root |
Root用户的工作目录 |
/sbin |
和bin类似,是1些可执行文件,不过不是所有用户都需要的,1般是系统管理所需要使用得到的。 |
/tmp |
系统的临时文件,1般系统重启不会被保存。 |
/usr |
包含了系统用户工具和程序。 /usr/bin:非必须的普通用户可执行命令 /usr/include:标准头文件 /usr/lib:/usr/bin/ 和 /usr/sbin/的库文件 /usr/sbin:非必须的可执行文件 /usr/src:内核源码 /usr/X11R6:X Window System, Version 11, Release 6. |
/srv |
该目录存放1些服务启动之后需要提取的数据 |
conclusion
Above is the Linux file directory introduction and file color differences of the whole content, I hope to help you. Interested friends can continue to refer to other related topics in this site, if there is any deficiency, welcome to comment out. Thank you for your support!