stay Linux In the system , There are several directories that are more important , Usually, you need to be careful not to delete or change internal files by mistake .
/etc： It's also mentioned above , This is the configuration file in the system , If you change a file in this directory, the system may fail to start .
/bin, /sbin, /usr/bin, /usr/sbin: This is the system's default location directory for execution files , such as ls Is in the /bin/ls In the catalog .
bin yes Binaries ( Binary ) Abbreviation , This directory holds the most frequently used commands .
What's stored here is startup Linux Some of the core files used , Including some connection files and image files .
dev yes Device( equipment ) Abbreviation , What is stored in this directory is Linux External equipment of , stay Linux The way to access devices and files in is the same .
etc yes Etcetera( wait ) Abbreviation , This directory is used to store all configuration files and subdirectories required by system management .
User's home directory , stay Linux in , Each user has its own directory , Generally, the directory name is named after the user's account , As shown in the figure above alice、bob and eve.
lib yes Library( library ) This directory contains the most basic dynamic connection shared library of the system , Its function is similar to Windows Inside DLL file . These shared libraries are required for almost all applications .
This directory is usually empty , When the system is shut down illegally , Here are some files .
linux The system will automatically identify some devices , for example U disc 、 Optical drive and so on , When identified ,Linux Will mount the identified device to this directory .
The system provides this directory for users to temporarily mount other file systems , We can mount the CD-ROM drive on /mnt/ On , Then enter the directory and you can view the contents of the CD-ROM drive .
opt yes optional( Optional ) Abbreviation , This is the directory where the additional software is installed for the host . For example, you install a ORACLE The database can be placed in this directory . The default is empty .
proc yes Processes( process ) Abbreviation ,/proc It's a pseudo file system （ Virtual file system ）, It stores a series of special files about the running state of the current kernel , This directory is a virtual directory , It's a mapping of system memory , We can get system information by directly accessing this directory .
The contents of this directory are not on the hard disk but in memory , We can also modify some files directly , For example, you can use the following command to shield the host ping command , Make it impossible for others to ping Your machine ：
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all
This directory is for system administrator , Also known as the user's home directory for super users .
s Namely Super User It means , yes Superuser Binaries ( Super user binaries ) Abbreviation , Here is the system management program used by the system administrator .
This directory is Redhat/CentOS Unique directory ,Selinux It's a security mechanism , Be similar to windows The firewall of , But this mechanism is more complicated , This directory is for storing selinux Related documents .
This directory stores some data that needs to be extracted after the service is started .
This is a Linux2.6 A big change in the kernel . This directory has 2.6 A new file system in the kernel sysfs .
sysfs The file system integrates the following 3 File system information ： For process information proc file system 、 For equipment devfs File system and for pseudo terminal devpts file system .
The file system is an intuitive reflection of the kernel device tree .
When a kernel object is created , The corresponding files and directories are also created in the kernel object subsystem .
tmp yes temporary( temporary ) This directory is used to store some temporary files .
usr yes unix shared resources( Shared resources ) Abbreviation , This is a very important Directory , Many of the user's applications and files are in this directory , Be similar to windows Under the program files Catalog .
Applications used by system users .
Super users use more advanced hypervisors and system daemons .
The default placement directory for kernel source code .
var yes variable( Variable ) Abbreviation , There is something expanding in this catalog , We are used to putting the frequently modified directories in this directory . Including various log files .
It's a temporary file system , Information since the storage system started . When the system restarts , The files in this directory should be deleted or erased . If you have /var/run Catalog , It should point to run.