Detailed explanation of [Linux] directory structure

Mr. arbor I 2022-01-26 11:26:45 阅读数:802

detailed explanation linux directory structure

First look at Linux Three concepts related to directory :

  • Linux The file system of is a hierarchical tree structure ,“/” Is the vertex of all directories , be called " root directory ", Create other directories under this directory
  • Data in different directories can be distributed on different disks , All directories are organized and named according to rules
  • Linux Also distinguish between absolute paths and relative paths
     Insert picture description here

bin Catalog [ Commonly used ]

bin:Binaries, Store binary executables , That is, common commands , for example :ls、cp、mkdir…
bin The directory also has two branches :/usr/bin/usr/local/bin, These two folders also contain multiple commands

sbin Catalog

sbin:super user binaries, Store binary executables , Only root Only users can access it ( Is the directory of commands that can only be accessed by super Administrators )
sbin The directory also has two branches :/usr/sbin/usr/local/bin

home Catalog [ Commonly used ]

home: The home directory of ordinary users , stay Linux in , Each user has its own directory , Generally, the directory is named after the user's account
I created a virtual machine when I installed it arbor Users of , So now home There will be a... Under the folder arbor Subfolders of
 Insert picture description here
 Insert picture description here

root Catalog [ Commonly used ]

root: Linux Super user directory , yes root User's home directory , Be similar to Windows Systematic administrator Folder

lib Catalog

lib:library, Store the shared library files and kernel module directory required to start the system and run commands , The most basic dynamic connection shared library is needed for system startup , Be similar to Windows Medium DLL file , These shared libraries are required for almost all applications

lost+found Catalog

lost+found: This directory is usually empty , When the system is shut down illegally , Some files will be stored here , You can see this directory on the terminal

etc Catalog [ Commonly used ]

etc:etcetera, Store system configuration files and some subdirectories ,yumrpm The default configuration file path for installing applications in this way is here

usr Catalog [ Commonly used ]

usr:unix shared resources, The directory where the application installed by the user is stored , Be similar to Windows Medium program files Folder

/usr/local Catalog

usr The directory contains two important subdirectories :

  • /usr/local: The default directory of the compiler installer
  • /usr/src: Program source directory

boot Catalog

boot: Linux Kernel and system boot program directory , Including some linked files and image files , Don't touch it if you're okay

proc Catalog

proc: It's a virtual directory , Is a mapping of system memory , When the system is running, the process information and kernel information are stored in this directory , Access this directory to get system information , Don't touch it if you're okay

srv Catalog

srv:service, This directory stores some data to be extracted after the service is started , Don't touch it if you're okay

sys Catalog

sys: This is a Linux2.6 A big change in the kernel , This directory has 2.6 A new file system in the kernel sysfs, Don't touch it if you're okay

tmp Catalog

tmp:temporary, Used to store some temporary files

dev Catalog

dev:devices, Used to store equipment files , Like sound cards 、 disk 、 Optical drive and so on , Store all the hardware in the form of files , Be similar to Windows Device manager of the system

media Catalog [ Commonly used ]

media: Linux The system will automatically identify some devices , such as U disc 、 Optical drive and so on , After identification Linux The identified device will be attached to this directory

mnt Catalog [ Commonly used ]

mnt:mount, The system provides this directory to allow users to temporarily hang on other file systems , External storage can be mounted to /mnt/ in , Enter the directory and you can see the mounted content , You can enter the column to see VMtools The article used by

opt Catalog

opt: The directory where the software is installed for the host , If installed ORACLE The database can be stored in this directory , The directory is empty by default

var Catalog [ Commonly used ]

var:variable, Files used to store data that needs to be changed at run time , Generally, it is the running log of the system and software

selinux Catalog

selinux:security-enhanced linux,SELinux It's a security subsystem , The same control program can only access specific folders , There are three working modes , You can set it yourself , When enabled, you can see the folder

copyright:author[Mr. arbor I],Please bring the original link to reprint, thank you. https://en.javamana.com/2022/01/202201261126423019.html