Article directory
Linux tree file system structure
View the directory under Linux
Enter the command in the terminal ls /
, you will see all the directories under the Linux root directory :
Explanation of the Linux directory
Table of contents | explain |
---|---|
/bin | Bin is the abbreviation of Binary, which saves the executable binary file - the command we typed. Executable by all users. |
/boot | Store the Linux kernel, including startup files, boot files, and driver files |
/dev | dev is the abbreviation of Device (device), which stores Linux hardware devices (hard disk, network card, etc.), and these devices are abstracted into a file; sda is the hard disk |
/etc | Almost all configuration files of Linux are stored in plain text |
/home | The user's home directory , in Linux, each user has its own directory, which stores the user's private files . The directory name is named after the user's account. PSroot user's directory is separate |
/lib | It stores the most basic dynamic link shared library of the system, and the suffix is .so. It acts like a .dll file in Windows. Almost all applications need to use these shared libraries |
/lost-found | Generally, it is empty. When the system is shut down illegally, some files are stored here. |
/meida | The Linux system will automatically recognize some devices, such as U disk, CD-ROM, etc. After recognition, Linux will mount the recognized devices to this directory |
/mnt | Basically the same as /media. /mnt must have, /media does not necessarily have |
/opt | Used to store large software installations, but this is not mandatory |
/proc | This directory is a virtual directory, which is a map of system memory and displays real-time information of the system. The content of this directory is not on the hard disk but in the memory . We can also directly modify some files in it. For example, the following command can be used to block the ping command of the host so that others cannot ping your machine: echo 1 > /proc /sys/net/ipv4/icmp_echo_ignore_all |
/root | This directory is the user home directory of the system administrator, also known as the super authority |
/sbin | s means Super User, only super users can execute the commands inside |
/selinux | This directory is unique to Redhat/CentOS. Selinux is a security mechanism, similar to the Windows firewall, but this mechanism is not complicated. This directory is for storing selinux-related files. |
/sys | Store information at the bottom of the system |
/tmp | Temporary files are stored and will be deleted automatically |
/usr | Store installed general software |
/was | Store frequently changing files, such as various log files (in /var/log), mail, etc. |