Linux Basic Chapter four system directory structure

Source: Internet
Author: User

Linux System directory Structure


• Thinking: What is a file? How are many documents organized effectively?


File refers to a storage space storage of a stream of data can be accessed by name, the path map of the file store, we call the directory, the file is stored in these directories.

Many files are stored in a hierarchical structure that can be called an inverted tree structure.

in a Linux system, the first layer of the system directory, the original starting point "/", that is, the so-called root is the parent directory of all directories, and all files in this directory are arranged in an inverted tree-like structure.

· How does a Linux system differ from the directory structure of a Windows system?

The Linux system distributes the file through an inverted tree structure, the original starting point is "/", in the/dev/pts/0 path, the leftmost / root, the other /represents the path delimiter; All partitions of the Linux system are under the root.

Each partition of the Window system is independent, such as the C- Drive,D- disk, etc., and the path delimiter is "\"

in Linux , file systems have a specific hierarchy of standard FHS.

FHS:Filesystem hierarchystandard, file system level standards, such as:

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/86/4A/wKioL1e7CzaBxkcJAAFD3kelSuA139.jpg "title=" Board1.jpg "alt=" Wkiol1e7czabxkcjaafd3kelsua139.jpg "/>


each directory under the root directory has the value and function of its existence, and below we explain the directory below

/bin store basic Command Program files available to all users

/sbin a tool program for use by system administrators

each static file that the/boot loader must use, such as Kerrnel, Initramfs, Grup, etc.

/dev Store special files or external device files

/ etc configuration files for System programs

Home directory home directories for ordinary female workers, typically the home directory for each normal user is the default directory for this user name /home/username

home directory for/root system users

/LIB provides a shared library for system startup or applications on the root file system (/bin,/sbin, etc.) and provides the kernel with

kernel modules; These shared libraries are required for almost all programs

/lib64 a directory of shared libraries that are unique to the system

/media Portable Equipment mount point,cdrom,floppy, etc.;

/mnt temporary mount points for other file systems

/OPT the installation location of the third-party application, which is empty by default

/srv data provided by the current host for network services

/tmp Anyone can access this directory, this is used to temporarily prevent files in the place, important files can not be placed in

inside this directory, FHS Suggestion: Clear this directory every time you turn on the boot

/USR Global shared read-only data path; Many of the users ' applications and files are placed in this directory

/usr/bin applications used by system users

/usr/sbin more advanced hypervisor and system daemons used by administrator users

/USR/SRC Program Source storage location

/usr/include C Program header file

/usr/share storage location of schema-specific files such as command man pages and self-documenting documents

/usr/local Another Level table of contents

installation location of the /USR/X11R6 X-window program

/usr/local allows system administrators to install local applications and is typically used to install third-party software

/ var Storage of directories that are frequently changed; log, temporary e-mail, and so on; sometimes it's a separate partition .

/var/cache Some staging files for the application execution process

/var/lib program execution process, need to use the data files to place the directory, each software has a directory of software

/var/lock Lock the device to ensure that the device will only be used by a single software

/var/log log in files to prevent directories, compare important files such as /var/log/massege,/var/log/wtmp

(Logging of logged-in information), etc.

/var/mail the directory where the personal mailbox is placed, the link file for/var/spool/mail/

After the/var/run program or service runs, their PID will be placed in this directory

/var/spool The queue data is placed, the data is deleted after use

The system receives a new message will be placed in the/var/spool/mail, the user after receiving the message by default will be deleted

If the mail is not sent, then put it in the/var/spool/mqueue , wait until it is sent out to delete if the work row

data crontab, it is placed into the/var/spool/cron/


The/proc virtual file system is used to store information about the kernel and processes, most of which are kernel parameters, kernel

The user can directly access this directory to obtain parameters and related information. Within this directory, the

Not on the hard drive, but in memory, we can also directly modify some of the files inside

/sys An important change in the Linux2.6 kernel. This directory installs a virtual file system in the 2.6 kernel

sYsfs.

The SYSFS virtual file system integrates information from three file systems: the proc file system for process information

The Devfs file system for the device , and the Devpts file system for the pseudo-terminal . Sysfs Virtual text

system provides a more ideal path to access the kernel data than the proc file system;

An interface that provides a unified model for managing Linux devices, the properties associated with a hardware device are mapped

Shoot file

/selinux This directory is a unique directory ofRedhat and CentOS, and SELinux is a security mechanism similar to

Firewall in Windows , but this is a more complex mechanism, which is to store the SELinux phase

File is closed.

/lost+found This directory is empty by default, and when the system shuts down illegally, some files are stored here .

Note: The above list of red, is more important files, be careful not to accidentally delete, because the configuration file, the system preset

Execute file, user, and root The instructions used by the user are stored in these directories, respectively.


This article is from the "Ccschan" blog, make sure to keep this source http://ccschan.blog.51cto.com/11854461/1841274

Linux Basic Chapter four system directory structure

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.