Linux Chapter 1: Introduction to Directory Files (a must-see for novices)

linux file directory knowledge combing (everything is a file)

1.1linux directory structure

1.1.1 Basic introduction

  • The linux file system adopts a hierarchical directory structure. The top level in this structure is the / (root) directory, and then other directories are created under this directory.
  • Understand the Linux tree file directory, the most classic sentence of Linux. In the Linux world, everything is a file. (Even a hardware device is also identified by text)

1.2 List of linux directories

linux directory structure

1.2.1 Specific catalog description

  • /root : This directory is the user home directory of the system administrator, also known as the super authority.
  • /bin : is the abbreviation of Binary, here are the most frequently used commands.
  • /boot : Stores some core files used when starting linux, including some link files and mirror files.
  • /dev : Similar to the Windows device manager, all hardware is stored in the form of files.
  • /etc : All configuration files and subdirectories needed for system management
  • /home : The home directory of ordinary users. In the Linux system, each user has its own directory. Generally, the name of the directory is named after the user's account.
  • var : This directory contains things that are constantly expanding. It is customary to put frequently modified directories in this directory, including various log files.
  • /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.
  • /usr : This is a very important directory. Many user applications and files are placed in this directory, similar to the program file directory under Windows.
  • /media : Linux system will automatically recognize some devices, such as U disk, CD-ROM, etc. When recognized, linux will mount the recognized device to this directory.
  • /sbin (/usr/sbin, /usr/local/sbin) : s means Super User, and the system management program used by the system administrator is stored here.
  • /lost+found : This directory is generally empty. When the system is shut down illegally, some files are stored here.
  • /proc : This directory is a virtual directory, which is a mapping of system memory. Visit this directory to obtain system information.
  • /srv : (Do not modify related to the kernel) short for service. This directory stores some data that needs to be extracted after the service is started.
  • /sys : (Do not modify related to the kernel) This is a big change in the linux2.6 kernel. This directory installs a new file system in the 2.6 kernel.
  • /tmp : This directory is used to store some temporary files.
  • /mnt : The system provides this directory for users to temporarily mount other file systems. We can mount external storage to /mnt/, and then enter the directory to view the contents.
  • /opt : This is the directory where additional software is installed on the host. It is empty by default.
  • /usr/local : This is another directory where additional software is installed on the host. It is usually installed by compiling source code.
  • /seLinux (security-enhanced linux) : Similar to 360, it is a security subsystem that can control programs to only access specific files.

1.3 Summary of Linux Directory Structure

1. In Linux, the directory structure has a / (root), and other directories are branched in the root directory.
2. In Linux, there are many directories that are automatically generated after installation, and each directory contains content, so don't modify it randomly.
3. In linux, all devices can be represented by files (character device files such as keyboard and mouse, block device files such as hard disk).
4. In Linux, form a directory tree in your mind as soon as possible.

Thank you all for reading. Due to the limited ability of the editor, please contact me if you have any objections to the compilation.

Guess you like

Origin blog.csdn.net/qq_44112474/article/details/103334712