Overview of the Ubuntu file system

 1. Root directory

The root directory, the logical end of the entire file system, is represented by "/"

  1. First-level directory
    */bin contains various common programs that can be shared by ordinary users, systems, and system administrators, such as bash, dd, df, gzip, grep, mv, mkdir and other common basic commands

*/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.

  1. Important secondary directory

*/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

Overview of the Ubuntu file system
ubuntu unzip the rar file
Modify the default root password of the Ubuntu operating system
The process of solving the problem of installing ImageMagick under Ubuntu system
Deploy the mail system under Ubuntu 19.10
How to extend the root directory of LVM under Ubuntu system
How to fix the problem of missing system settings on Ubuntu 14.04
The locate file search command in Ubuntu16.04
The apt-get command of Ubuntu basic tutorial
The implementation of the Ubuntu18.04 installation Pycharm tutorial
Ubuntu system installation
Expand the disk size of Ubuntu under VMware
Summarize the knowledge points of Centos7 system reinforcement
Solve the problem of installing VMwareTools on Ubuntu 18.04
ubuntu adjusts the priority of swap swap space usage
Summary of Ubuntu system and privacy cleaning tools
The basic configuration and interface beautification of Ubuntu
Install the old version of seurat under Ubuntu
Talking about the first experience of using Ubuntu
How to open the ubuntu system in win10
First look at the new features of Ubuntu 17.10
The road to reinstallation of ubuntu 18.04 from scratch
The use of crontab for ubuntu scheduled tasks
The consequences of uninstalling python in ubuntu, very
Introduction to the use of Hanlp in ubuntu
Cancel the background color of the Ubuntu (wsl) folder
The latest method of installing Mongodb on Ubuntu 16.04
Solve the problem of installing Theano on Ubuntu19
stacer personally thinks the best ubuntu system management software
The default installation path of apt-get install of ubuntu (transfer)
Detailed explanation of static DNS configuration under Ubuntu system
The difference between CentOS and Ubuntu in Linux system
Canonical announced the temporary closure of Ubuntu 17.10 download channel
Solution to the slow speed of ubuntu18.04 wireless network
3D effect of ubuntu
Ubuntu dual system installation
Online expansion of file system by LVM under Centos7
Summary of ubuntu usage
[Share] Solve the problem of failed installation of Vitis 2019.2 on Ubuntu 16.04
How to control the ubuntu system in win10 through ssh
How to create LVM for XFS file system under Ubuntu
The problem of MySQL import file failure in CentOS environment
Ubuntu adds the Chrome icon to the correct posture of the launcher
The operating mode of the open source community: Debian Vs. Ubuntu
Encountered in the process of building a virtual environment in ubuntu
The screen is blank after upgrading the new version of ubuntu
Explain the solution to the freeze when ubuntu dual system starts
Consolidate the foundation of Python (4)
Consolidate the foundation of Python(7)
Consolidate the foundation of Python(6)
Ubuntu install the latest Python 3.
"Consolidating the Foundation of Python" (1)
Use of Anaconda in Ubuntu
Consolidate the foundation of Python(5)
ubuntu1804 build the latest Suricata
Use of mediawiki under ubuntu
Ubuntu Xfce desktop system settings
Ubuntu file synchronization tool rsync
Summary of various ubuntu problems
Initial setup of Ubuntu 16.04 server
Consolidate the foundation of Python (3)