The directory under Linux is described below:
In the Linux system, everything is stored in a unique "virtual file system", the "virtual file system" is a tree-like structure to start with a root directory. File to represent all logical and non-logical entities, logical entities refers to files and directories, non-logical entities refer to hard drives, terminals, printers, etc.
A Linux system accesses a file in the order of "virtual file system-hard disk-partitions on hard disk-specific file systems on partitions-Files in specific file systems".
In the Linux system, the main two things: "Virtual file System" in the file and the Linux operating system kernel itself.
Note: The directory delimiter under Windows is \ and the directory delimiter under Linux is/
Here's how to get started with the most important directories:
1./root directory:
2,/boot boot program, kernel and other storage directory.
3,/sbin Super User can use the storage directory of commands
4,/bin Common user can use the command to store the directory
5,/lib root directory of the program's shared library directory
6,/dev Device file directory in the Linux device as a file appears here the device can be hard disk, keyboard, mouse, network card, terminal, and other devices, through access to these files can access to the appropriate device.
7, home directory of ordinary users, the directory holds the vast majority of user files (user's own profile, custom files, documents, data, etc.), except the root user
8,/root user root home Directory system administrator (that is, root user or superuser) of the main directory is special, not stored in/home, but placed directly in the/root directory.
9,/etc global configuration file directory system and programs can generally be modified by modifying the corresponding configuration file, to configure. For example, to configure the system to boot up those programs, configure a program to show when the start of the style and so on.
10./usr This directory contains the command library files and files that are not modified in the usual operations.
This directory is also a very important directory for the system, which is similar to the "program Files" directory above windows (please forgive me that I might be less appropriate to do this ^_^.) When installing the program, the default is to install a subfolder within this file.
11,/usr/lib
The target library file, including the dynamic Connection library, plus some storage locations for executables that are not normally called directly.
This directory is similar to the/lib directory, the rationale is that the files stored here should be the/bin directory for the application of the library files required to store, and do not rule out some exceptions.
12,/usr/bin
A directory that is used by the general consumer and is not a required executable file such as System self-test.
This directory is equivalent to the directory under the root file system (/bin, non-boot system, non-repair system, and non-locally installed programs are generally placed in this directory.
13,/usr/sbin
The executable file that the administrator uses for non-system must be stored in the directory.
This directory is equivalent to the directory under the root file system (/sbin, a binary file that holds the hypervisor, and these files are not required for system boot or file system mount/USR directories or repair systems.
14,/usr/local
Installs a generic default path for local programs.
When we download a program source code, compile and install, if not specifically specify the program path installed, then the default will be the program-related files installed in the directory of the corresponding directory. For example, the installation of the program executable file is installed (the essence of the installation is copied to the/usr/local/bin, this program (the executable file needs to rely on the library files are installed in the/usr/local/lib directory, the installed software if it is a development library (such as QT, GTK and so on the corresponding header file may be installed in the/usr/local/include and so on. In other words, the contents of this directory is usually the default path of the software we install later, if the default path is chosen as the installation path of the software, the files of the installed software are restricted to this directory, the subdirectories of which are the corresponding subdirectories of the root directory.
15,/proc
Special Files directory.
This directory uses a special file system format (proc format, the kernel supports this format. It contains all the virtual files. They are not saved on disk or Occupy disk space (although command ls-c will show their size). When you look at them, you actually see the information in memory that helps us understand the information inside the system. For example:
├1/the directory of information about process 1. Each process is/proc under a directory named its process number.
├cpuinfo processor information, such as type, manufacturer, model, and performance.
├devices a list of device drivers for the currently running core configuration.
├DMA Displays the DMA channel currently in use.
├filesystems the file system of the core configuration.
├interrupts shows the interrupts used, and how many of each there has been.
├ioports the I/O port currently in use.
├kcore System physical memory image. The same size as physical memory, but does not actually account for so much memory;
├kmsg the core output message. is also sent to the syslog.
├ksyms core symbol table.
├loadavg system "average load"; 3 meaningless indicators indicate the current workload of the system.
├meminfo memory usage information, including physical memory and swap.
├modules which core modules are currently loaded.
├net Network protocol status information.
├self to view the symbolic connection of the process directory of the/PROC program.
Different states of the ├stat system
├uptime the length of time the system started.
└version Core version.
16./MNT (Mount point)
Temporary mount directory.
This directory is generally used to store mounted storage device mount directory, such as disk, optical drive, network file system, etc., when we need to mount a disk device, we can mount the disk device to this directory, so that we can directly access the directory to access the disk.
17,/media
Mount the media device directory.
Mounted media device catalogs, typically external devices are mounted here, such as CDROM. For example, we insert a USB flash drive, we will generally find that Linux automatically set up a disk directory in this directory, and then mount the USB stick to the disk directory, by accessing the disk to access the USB drive.
18./var
A directory in which content changes frequently.
The size of the files in this directory may change, such as buffer files, log files, cache files, etc. are generally stored here.
19,/tmp
Temp file directory.
This directory holds some temporary files in the system, and the files may be automatically emptied by the system. System directly to the TMPFS type of file system mount to this directory, TMPFS file system is supported by the Linux kernel, the data in this file system is actually in memory, because the memory data loss is volatile, when the system restarts we will find that the directory was emptied.
20,/lost+found
The location where the files are recovered.
When the system crashes, the files that need to be recovered during the system repair process may be found here, and this directory is generally empty.
To summarize, say:
· The user should present the file under the/home/user_login_name directory (and its subdirectories).
· In most cases, the local administrator installs additional software in the/usr/local directory and signs the main execution program that is connected under/usr/local/bin.
· All settings of the system are in/etc directory.
· Do not modify anything in the root directory ("/") or/usr directory unless you really know what to do. These directories are best kept consistent with Linux publishing.
· Most tools and applications are installed in the directory:/bin,/usr/sbin,/sbin,/usr/x11/bin,/usr/local/bin.
· All the files are under a single directory tree. There is no so-called "driver".
Reference article Address: address one address two
Directory explained under Linux