The main directories in the Linux system, some of which may be different in different Linux distributions.
directory name | effect |
---|---|
bin | Store common commands |
boot | Store boot system related files |
dev | Store device files |
etc | Store system configuration files |
home | Store the user's home directory |
lib | storage system shared library |
lib64 | Storage system shared library for 64-bit systems |
lost+found | Used to recover files and directories from abnormal system shutdown or file system corruption |
media | Automatically identify device mount points |
mnt | Manually mount the device |
opt | Store third-party software |
proc | Virtual file system, providing system kernel and process information |
root | The home directory of the superuser (root) |
run | Store runtime data, such as process ID and socket file, etc. |
sbin | Store system commands used by administrators |
srv | Store data provided by local services, such as files of services such as HTTP and FTP |
sys | Virtual file system, providing information related to system hardware |
tmp | Store temporary files and automatically clear them after restarting the system |
usr | Store system applications and files, such as commands, libraries, documents, etc. |
was | Store variable data such as logs, caches, and temporary files generated by system files and applications |
Under the Linux terminal, ls
the directory output by the command will be displayed in different colors, and the meanings of the different colors are as follows:
color | type |
---|---|
blue | Table of contents |
green | executable file |
red | Archives and Compressed Files |
magenta | image file |
orange | Other files |
black | plain text file |
light blue | link file |
grey | system file or directory |
This way of distinguishing different types of files or directories helps to quickly identify file types and improve work efficiency.