1. Root directory
The root directory, the logical end of the entire file system, is represented by "/"
*/boot contains important boot files such as the system boot program GRUB and its configuration files, Linux kernel file vmlinuz and disk memory image file initrd.img
*/dev contains all device files supported by the system. Specifically, console represents the system console, lp0 represents the printer, mem represents the physical memory of the system, sda represents the first disk connected to the main control gas, and sda1 and sda2 represent the first and the first disk. Two disk partitions, ttyXX represents the serial device of the system, etc.
*/etc contains all configuration files for system management and maintenance, such as host.conf, resolv.conf, sysctl.conf and syslog.conf. In addition, there are a large number of configuration files in separate subdirectories. It should be noted that you should regularly use the Backups backup tool to back up important configuration files in this directory, so that you can quickly restore the system when needed
*/home contains the home directories of all ordinary users. Every time a new user is added, the system will create a subdirectory with the same name as the user in the /home directory as the user's home directory
*/lib contains the system boot process, as well as the kernel modules and various dynamic link shared library files needed to run system commands (extension .so, similar to .dll files in Windows systems)
*/lost+found Each file system partition has a lost+found directory, which is used to store the files and directories deleted by the fsck command when detecting the dufus file system
*/media contains the mount point of the removable storage medium (mobile hard disk or U disk). If a U disk is inserted, the system will automatically mount the U disk in a subdirectory of this directory
*/mnt contains the mount points of all custom file systems, any file system can be mounted, such as NFS or CIFS network file system
*/opt The installation directory of additional software such as applications, similar to the Program Files directory in Windows systems
*/proc virtual file system, the directory is empty when the system is shut down, and the root directory of the process file system when the system is running, some of the files correspond to the currently running process and can be used to access the address space of the current process
*/root Home directory of super user root
*/sbin contains common tools for super administrators, such as management and maintenance, system boot and repair command collection
*/srv shares some functions of the /var directory and saves some data files used by network services
*/sys is a virtual directory like proc, the root directory of various device configuration information of the system, such as the block subdirectory contains configuration information of disks and disk partitions
*/tmp Temporary file directory, used to store temporary files generated during system operation, or for users to store their own temporary files. It should be noted that only the creator of the file can delete the corresponding file
*/usr This directory can be used as a subdirectory under the root directory, which saves various shared data provided by the system (such as user commands, library functions, header files and documents, etc.), or as a separate file system. Think of it as a recursive directory to the root directory, making the file system more flexible
*/var This directory is similar to the /usr directory. First, it is a subdirectory under the root directory. It can also be used as a separate file system to store various variable-length data files (such as log files) and temporary files Or pending temporary files, etc.
*/boot/grub contains GRUB configuration files, and 3 different initial boot programs, etc.
*/etc/apt contains configuration files used by software management tools, such as sources.list, etc.
*/etc/cron.d is used to store the configuration and control files used by the corn process to schedule and run background programs. Other related directories include: corn.hourly, corn.daily, corn.weekly and corn.monthly 4 directories
*/etc/init.d is used to store script files that need to be scheduled and executed by init during system startup
*/etc/network which contains the configuration file interface of the network interface, and related configuration tools
*/etc/X11 which contains various configuration files used by the X server, such as xorg.conf, etc.
*/usr/bin contains various commands frequently used by users
*/usr/include is used to store various C language header files. The header files in this directory and its subdirectories are files that C developers need to reference frequently. Among them, the data structures defined in subdirectories such as sys, linux and bits are of great reference value for in-depth study, understanding and mastery of the Linux system
*/usr/lib contains various shared library functions, which can be used by programmers to link their own applications in a static or dynamic way
*/usr/sbin contains various system management and maintenance commands frequently used by system administrators after the system is booted
*/usr/share shared directory, which contains man (root directory of online documentation), info (root directory of GNU info documentation), doc (documents specific to various software packages), locate (locale), vim (user guide) ) And zoneinfo (time zone definition) and other subdirectories
*/usr/scr is used to store the source code and documentation of the Linux system kernel
*/var/lib is used to store package-specific dynamic link shared libraries, configuration files, data files and status information, etc.
*/var/log The storage directory for system daemon log files, which contains lastlog (the time record of the last registration of each user), message (log messages of all kernels and system programs recorded by syslogd) and wtmp (all users’ System registration/deregistration records) and other important documents. The files located in the /var/log directory will continue to grow, which requires regular backup or deletion. Usually the Linux system adopts daily, weekly or monthly time periods, performs routine inspections regularly, and deletes outdated data by cyclic interception (such as using programs such as /usr/sbin/logrotate) and retains the data within a certain time range. The latest data keeps the file size at a moderate scale. In Ubuntu Linux system, the logrotate program will be executed regularly once a day to check and process system log files
*/var/lock is used to store the blocked files set when various service processes or applications access specific devices or files
*/var/run The root directory of the system running information file, in which various .pid files store the PID of the corresponding daemon. Another most typical file is /var/run/utmp, which contains user registration information in the current system
*/var/spool is used to cache various files waiting to be processed, such as printing tasks. Usually the cache files processed by each type of generation are in its own subdirectory, such as /var/spool/cups, etc.
*/var/tmp is used to store various temporary files
Recommended Posts