Linux file system and directory structure

basic introduction

Windows file system

Insert picture description here
Each disk in the Windows system has a root directory structure, which is equivalent to a forest .

Linux file system

Insert picture description here

Insert picture description here

The linux file system adopts a hierarchical tree-like directory structure. The top level in this structure is the root directory "/", and then other directories are created under this directory. It is very important to have a deep understanding of the Linux tree file directory.
Remember a classic saying: In the Linux world, everything is a file.

Specific directory structure

Linux system directory tree structure

  1. /bin [Key point] (/usr/bin, /usr/local/bin)
    is the abbreviation of Binary, this directory stores the most frequently used commands
  2. /sbin (/usr/sbin, /usr/local/sbin)
    s means Super User, and the system management program used by the system administrator is stored here.
  3. /home [Key]
    The home directory for common users. In Linux, each user has its own directory. Generally,
    the directory name is named after the user's account.
  4. /root [Key point]
    This directory is the home directory of the system administrator, also known as the user's home directory of the super authority.
  5. /lib The
    most basic dynamic link shared library required for system startup, its function is similar to the DLL file in Windows. Almost all applications need to use these shared libraries.
  6. The /lost+found
    directory is generally empty. When the system is shut down illegally, some files are stored here.
  7. /etc [Key]
    All configuration files and subdirectories my.conf needed for system management
  8. /usr [Key point]
    This is a very important directory. Many user applications and files are placed in this directory, similar to the program files directory under windows.
  9. /boot [emphasis]
    stores some core files used when starting Linux, including some connection files and mirror files.
  10. The /proc
    directory is a virtual directory, which is a mapping of system memory. Visit this directory to obtain system information.
  11. The
    abbreviation of /srv service, this directory stores some data that needs to be extracted after the service is started.
  12. /sys
    This is a big change in the linux2.6 kernel. A new file system s in the 2.6 kernel is installed in this directory
  13. The /tmp
    directory is used to store some temporary files.
  14. /dev is
    similar to the Windows device manager, storing all hardware in the form of files.
  15. /media [Key point] The
    linux system will automatically recognize some devices, such as U disk, CD-ROM, etc. After recognition, linux
    will mount the recognized device to this directory.
  16. /mnt [Key]
    This directory is provided by the system to allow users to temporarily mount other file systems. We can mount external storage on /mnt/, and then enter the directory to view the contents. d:/myshare
  17. /opt
    This is the directory where additional software is installed on the host. If ORACLE database is installed, it can be placed in this directory. The default is empty.
  18. /usr/local [Key point]
    This is another directory where additional software is installed on the host. Generally it is a program installed by compiling source code.
  19. /var [Key point]
    This directory contains things that are constantly expanding. It is customary to place frequently modified directories in this directory. Including various log files.
  20. /selinux [security-enhanced linux] 360
    SELinux is a security subsystem, which can control programs to only access specific files.

Linux directory summary

  1. The Linux directory has one and only one root directory /.
  2. The contents stored in each directory of Linux are planned, and there is no need to randomly place files.
  3. Linux manages and manages devices in the form of files. In the Linux system, everything is a file.

Guess you like

Origin blog.csdn.net/weixin_44736475/article/details/108950955