Beginners Linux, First of all, we need to find out Linux Standard structure catalog

/

  • root ---  start-up Linux Some of the core files used . Such as operating system kernel 、 Bootstrap Grub etc. .
  • home ---  Store personal files of ordinary users
    • ftp --- All user services
    • httpd
    • samba
    • user1
    • user2
  • bin ---  The executable file needed for system startup ( Binary system )
  • sbin ---  Directory of executable programs , But most of them store commands related to system management . Only root Permission to execute
  • proc --- fictitious , There is linux Kernel image ; Save all kernel parameters and system configuration information
    • 1 --- Process number
  • usr --- User directory , Store user level files
    • bin --- Almost all users use commands , In addition, there is a relationship between /bin,/usr/local/bin
    • sbin --- The system administrator commands , User related , for example , Most server programs
    • include ---   Deposit C/C++ The directory of the header file
    • lib --- Fixed program data
    • local --- Local installation software save location
    • man --- Manually generated directory
    • info --- Information document
    • doc --- Different package document information
    • tmp
    • X11R6 ---   This directory is used to save the run X-Window All the files you need . The directory also contains a directory for running GUI Configuration files and binaries to be saved .
    • X386 --- Same function X11R6,X11 Distribution version 5 System files for
  • boot --- Files needed to boot loader , The pictures needed by the system are saved here
  • lib ---  The common library of programs and core modules in the root file system directory
    • modules --- Loadable modules , Restart required modules after system crash
  • dev ---  Device file directory
  • etc --- The configuration file
    • skel --- home Directory establishment , The directory initializes
    • sysconfig --- The Internet , Time , Keyboard and other configuration directory
  • var
    • file
    • lib --- The files in this directory are stored when the system is running , Will change
    • local --- Installed in the /usr/local Program data for , Changing
    • lock --- Files use specific peripherals or files , Lock it up , Other files are temporarily inaccessible
    • log --- Log
    • run --- Legal information of system operation
    • spool ---  The printer 、 mail 、 Proxy server, etc
    • tmp
    • catman --- The cache directory
  • mnt ---  A temporary place to mount a file system . Generally, this directory is empty , When we are going to mount the partition, we will create a directory under this directory , And the device we're going to visit mount On this list , So we can access the file .
  • tmp --- Temporary file directory , The temporary files after system startup are stored in /var/tmp
  • lost+found --- Files recovered during file system repair

 

/: root directory , Generally, only directories are stored in the root directory , Do not store documents ,/etc、/bin、/dev、/lib、/sbin Should be placed in a partition with the root

/bin:/usr/bin: Directory of executable binaries , Such as common command ls、tar、mv、cat etc. .

/boot: place linux Some files used in system startup ./boot/vmlinuz by linux Kernel files for , as well as /boot/gurb. Separate partition is recommended , Partition size 100M that will do

/dev: Deposit linux Equipment files under the system , Access a file in this directory , Equivalent to accessing a device , It is commonly used to mount the CD-ROM drive mount /dev/cdrom /mnt.

/etc: Directory where system configuration files are stored , It is not recommended to store executable files in this directory , Important configuration files are /etc/inittab、/etc/fstab、/etc/init.d、/etc/X11、/etc/sysconfig、/etc/xinetd.d Remember to back up before modifying the configuration file .

notes :/etc/X11 Storage and x windows Related settings .

/home: System default user home directory , When adding a user account , The user's home directory is stored in this directory ,~ Represents the home directory of the current user ,~test Represent user test Home directory . Separate partition is recommended , And set up a larger disk space , Convenient for users to store data

/lib:/usr/lib:/usr/local/lib: The directory of the function library used by the system , The program is in progress , When you need to call some additional parameters, you need the help of the function library , The more important directory is /lib/modules.

/lost+fount: When a system exception produces an error , Some missing clips will be placed in this directory , Usually this directory will automatically appear in the device Directory . Such as loading the hard disk on /disk in , This directory will automatically generate a directory /disk/lost+found

/mnt:/media: CD default mount point , Usually the CD is attached to /mnt/cdrom Next , Not necessarily. , You can choose any location to mount .

/opt: The directory where the software is installed for the host . Such as :FC4 The use of Fedora Community development software , If you want to install a new KDE Desktop software , You can install the software in this directory . Former Linux In the system , Habits are placed in /usr/local Under the table of contents

/proc: The data for this directory is in memory , Such as system core , Peripheral , Network state , Because the data is stored in memory , So it doesn't take up disk space , The more important directories are /proc/cpuinfo、/proc/interrupts、/proc/dma、/proc/ioports、/proc/net/* etc.

/root: System administrator root Home directory , The first partition to start the system is /, So it's better to /root and / Put it under a partition .

/sbin:/usr/sbin:/usr/local/sbin: Place the executable commands used by the system administrator , Such as fdisk、shutdown、mount etc. . And /bin The difference is , These directories are for the system administrator root Commands used , General users can only " see " Instead of setting and using .

/tmp: Directory where general users or running programs temporarily store files , Anyone can visit , Important data cannot be placed in this directory

/srv: Data directory to be accessed after service startup , Such as www The data of web pages that the service needs to visit is stored in /srv/www Inside

/usr: Application store directory ,/usr/bin Store applications ,/usr/share Store shared data ,/usr/lib To store something that cannot be operated directly , But it is necessary for many programs to run some function library files ./usr/local: Store the software upgrade package ./usr/share/doc: System description file storage directory ./usr/share/man:  Program description file storage directory , Use man ls Time will be queried /usr/share/man/man1/ls.1.gz The content of Separate partition is recommended , Set up more disk space

/var: Place files that change frequently during system execution , Such as the log file changed at any time /var/log,/var/log/message: All login files are stored in the directory ,/var/spool/mail: The directory where the mail is stored ,/var/run: After the program or service starts , Its PID Store in this directory . Separate partition is recommended , Set up more disk space

References

1. Linux Directory Structure

2. Linux's directory structure

3. Linux Directory structure