Linux: Directory structure
Write in front:
Users should store files in the /home/user_login_name directory and its subdirectories.
In most cases, local administrators install additional software in the /user/local directory and symbolically link the main executive program under /usr/local/bin.
All settings of the system are in the /etc directory.
Do not modify the root directory ("/") or anything in the /usr directory unless you really want to know what to do. These directories are best to be consistent with when Linuxd was released.
Most tools and applications are installed in the directories /bin, /usr/sbin, /sbin, /usr/x11/bin, and /usr/local/bin.
All files are in a single directory tree. Linux has no so-called "driver".
Directory structure and main content "/" The root directory has the following subdirectories:
table of Contents | content |
---|---|
/usr | This directory contains all commands, libraries, documents and other files. These files will not change under normal operation. |
/where | This directory contains files that are changed during normal operations: spool files, log files, locked files, temporary files, and page format files, etc. This directory stores the things that are constantly expanding. In order to maintain the relative stability of /usr, files that are frequently modified can be placed in this directory. For example: /var/log stores log files. |
/home | This directory contains the user's files: parameter setting files, personalized files, documents, data, email, cached data, etc. |
/proc | Contains Unreal files. They do not actually exist on the disk and do not take up any space. (Command ls -l can check their size). When viewing these files, you are actually accessing information stored in memory, which is used to access the system. |
/bin | Executable files (binary) required when the system starts, these files can be used by ordinary users. |
/sbin | System executable files (binary), these files are not intended to be used by ordinary users. But ordinary users can still use them, but the directory must be specified. |
/etc | The configuration file directory of the operating system. |
/root | The home directory of the system administrator. |
/dev | Device file directory. Devices under Linux are treated as files, so the hardware is abstracted, which is convenient for reading and writing, network sharing, and needs to be temporarily loaded into the file system. Under normal circumstances, the device will have a separate subdirectory. These devices will appear in a separate subdirectory. Linux does not have a so-called driver. |
/lib | The core module shared library of the program in the root file system directory. |
/boot | File used for bootloader (LILO or GRUB). When the computer starts (if there are multiple operating systems, you may be allowed to choose the operating system), these files are loaded first. This directory will also contain the Linux core (compressed file vmlinux), but the Lniux core can also be elsewhere, as long as LILO is configured and LILO knows where the Linux core is. |
/opt | Optional application. |
/tmp | Temporary Files. The directory will be automatically cleaned up. |
/lost+found | Files recovered during file system repair |
the above. Details to be added.