linux directory configured according to the directory for each content

Why do I need to configure directory basis?

Some people may have some questions about why linux linux on either the server or install their own, generally they are the same inside the directory and file location of it?

Because to develop products or services of companies or individuals to build too many times, if everyone is to change the file location in accordance with their own ideas based on linux, which will cause problems in management. Can you imagine what you learn linux file storage location, and then to the company, all changed locations? Right, which will have the origin of the FHS.

linux directory configuration based on ----------- FHS

Filesystem Hierarchy Standard (Hierarchical File System Standard) of the abbreviation, most versions of Linux file organization using this form, similar to a file directory in the Windows operating system c drive, FHS organize files using a tree structure. FHS defines the purpose of each region of the system, files and directories that constitute the minimum required, but also gives the exception process with the conflict processing.

Directory definition

FHS specification defines two layers, a first layer, / each following directory file data should be what to put, for example, / etc should be placed document set, / bin and / sbin executable file should be placed and the like.
The second layer is defined for the sub-directory / usr in / var two directories. For example, / var / log placement system log file, / usr / share the shared data and the like are placed.

Directory tree

Under Linux, all files and directories from the root directory are beginning! That is the source of all directories and files - and then a branch of a down, a bit like dendritic ah ~ Therefore, we call this configuration directory is: "directory tree (directory tree)" What are the characteristics of this tree it?

His main features are:
start point 1. The tree root directory (/, the root);
2. Each directory can be used not only for the local side of the partition file system, may be used on the network filesystem. For example, you can use Network File System (NFS) server to mount a specific catalog.
3. Each file in this directory tree in the file name (include the full path) is unique.

A brief directory for storing content

Content directory name of the file should be placed
/ boot power required documents - cores, and the necessary boot menu configuration files
/ dev file stored in the form of any device interface
/ etc configuration files
/ home user's home directory
under / bin storage single-user mode commands can also operate the
function library used when the / lib boot, and / bin and / sbin following command to invoke
a command / sbin boot process required
/ media directory is used to mount the device file
/ opt to place the first tripartite software
/ root system administrator's home directory
/ srv some network services data file directory
/ tmp "share" temporary directory that anyone can use the
/ proc virtual file system, such as system kernel, processes, external devices and network status
software / usr / local user-installed
/ usr / sbin Linux system will not be used to boot the software / command / script
/ usr / share help and documentation can also be placed in a shared file
/ var main store file changes frequently, the log
/ lost + found error occurs when the file system, some of the missing file segments stored here

Published 14 original articles · won praise 4 · Views 523

Guess you like

Origin blog.csdn.net/qq_42534026/article/details/104146205