Linux Study two -Linux The directory structure of the system

stay Linux Under the root directory of , There are a lot of directories , But remember , about Linux for , Everything is a document . So the directory here is also a file . use ls / Command can see all kinds of different directories under the root directory .

1、/

root directory , Every file and directory starts at the root .

Only root The user has write permission under the directory .

2、/bin

binary User binary command file

Contains binary executables .

In single user mode , Common things that need to be used Linux All commands are in this directory . All commands used by users of the system are set here .

3、/boot

System boot loader file , Contains files related to bootloader .

Kernel initrd、vmlinux Files such as /boot Next .

4、/dev

device Device file

These include terminal devices 、USB Or any device connected to the system .

5、/etc

The configuration file . Contains all the configuration files required by the program .

Also included for starting / Stop the startup and shutdown of individual programs shell Script .

6、/home

HOME The home directory of ordinary users .

7、/lib

library Library files needed for software or command operation .

8、/lib64    

library What software or commands need to run 64 Location files .

9、/lost+found

Disk or file system corruption , power failure , Temporary file location

While checking the disk , Put the lost files here .

10、/media

Mobile media devices

Temporary directory used to mount mobile devices .

11、/mnt

Mount Directory

Temporary mount point ( Mount the cd-rom ), The system administrator can mount the file system .

12、/opt - Optional add-on applications

option Represents optional .

Include additional applications from third parties .

Additional applications should be installed in /opt/ perhaps /opt/ Subdirectory of .

13、/proc

process The directory of the process , Information about system processes ( kernel process Software )

14、/root

Highest authority root User's home directory .

15、/sbin

Contains binary executables

super binary Super command , Only root Users can execute .

16、/selinux

SELinux(Security-Enhanced Linux) Security enhanced Linux It's the national security agency (NSA) For the implementation of mandatory access control , It's a security mechanism , yes Linux The most outstanding new security subsystem in history .NSA Is in Linux With the help of the community, an access control system has been developed , Under the restriction of this access control system , A process can only access files that it needs in its task .SELinux Default installed in Fedora and Red Hat Enterprise Linux On , Also available as an easy to install package on other distributions .

SELinux It's a group for Linux Core patches , And provide some stronger 、 More secure mandatory access control architecture to work with core major subsystems . Based on the principles of confidentiality and integrity , It provides a framework to force the separation of information , To deal with *** Threat or any application that attempts to bypass the security architecture . To limit the damage that malicious or poorly designed programs may cause . It contains a set of templates for security policy configuration files to match general security goals .

Details refer to :

https://zh.wikipedia.org/wiki/%E5%AE%89%E5%85%A8%E5%A2%9E%E5%BC%BA%E5%BC%8FLinux

 

17、/srv    

srv On behalf of service

The database directory that the system can access when starting the service

Contains server specific service related data .

18、/sys    

System driver file

19、/tmp

temporary Where the system and users create temporary files , Default 15 The system will delete it automatically

All users can create 、 Delete file .

20、/usr    

Store user data 、 Program

Contains binaries 、 The library files 、 Source code for documentation and secondary programs .

21、/var    

variable Changeable documents , Variable file , Files where content can grow

Such as system log file (/var/log); Package and database files (/var/lib); E-mail (/var/mail); Print queue (/var/spool); Lock file (/var/lock); Multiple restarts of required temporary files (/var/tmp)

 

attach :Linux Directory structure mind map

source :https://dn-anything-about-doc.qbox.me/linux_base/4-1.png/logoblackfont