Linux directory structure detailed description

Source: Internet
Author: User
Tags syslog system log

Directory

1. Tree-like directory structure diagram

2./catalogue

3./etc/Catalogue

4./usr/Catalogue

5./var/Catalogue

6./proc/Catalogue

7./dev/Catalogue

This article mainly comes from the network to organize.

Directory Structure Reference address:

http://www.hudong.com/wiki/linux%E7%9B%AE%E5%BD%95%E7%BB%93%E6%9E%84

Http://linux.ccidnet.com/art/3067/20070315/1037337_1.html

Http://os.51cto.com/art/200802/65783.htm

http://www.iteye.com/topic/1125162

The following red font is the more important directory

1 , tree-like directory structure diagram

2,/ Catalogue

Directory

Describe

/

The root of the first hierarchy, the root of the entire file system hierarchy.

/bin/

Required commands (executables) that are available in single-user mode, for all users, such as cat, LS, CP, and/usr/bin.

/boot/

Bootstrapper files, for example: kernel, initrd; often a separate partition [6]

/dev/

necessary equipment, for example:,/dev/null.

/etc/

A system-wide configuration file for a specific host.

There is currently a controversy about this name. At Bell Labs in earlier versions of the UNIX implementation documentation,/etc is referred to as the/etcetra directory, [7] This is due to the fact that in the past this directory holds all things that are not elsewhere (however, FHS restricts/etc to store static configuration files and cannot contain binaries). [8] Since the early publication of the document, the catalog name has been re-styled in various ways. Recent explanations include reverse abbreviations such as "Editable text configuration" (English "Editable text config") or "Extended toolbox" (English "Extended tool Chest"). [9]

/etc/opt/

Configuration file for/opt/

/etc/x11/

Configuration file for X_window system (version 11)

/etc/sgml/

Configuration files for SGML

/etc/xml/

Configuration file for XML

/home/

The user's home directory, which contains saved files, personal settings, etc., is generally a separate partition.

/lib/

/bin/and/sbin/the necessary library files for binary files.

/media/

A mount point that removes media (such as CD-ROM), which appears in FHS-2.3.

/lost+found

In the Ext3 file system, when the system crashes unexpectedly or the machine shuts down unexpectedly, some file fragments are generated here. When the system is booting up, the fsck tool checks here and repairs the corrupted file system. When a problem occurs on the system. There may be files that are moved to this directory and may need to be repaired manually or moved to the original location of the file.

/mnt/

The file system that is temporarily mounted. such as Cdrom,u disk, directly into the optical drive can not be used, to be mounted after use

/opt/

Optional application package.

/proc/

A virtual file system that archives the kernel and process state as a text file (System information is stored in this directory). For example: uptime, network. In Linux, the corresponding PROCFS format is mounted. Files in this directory can only be viewed and cannot be changed (including root)

/root/

Home directory for super users

/sbin/

necessary system binaries, such as: Init, IP, mount. Sbin the command under the directory, ordinary users can not execute.

/srv/

The specific data of the site, provided by the system.

/tmp/

Temporary files (see/VAR/TMP), files in the directory are not retained when the system restarts.

/usr/

The default software will be stored in this directory. The second level for storing read-only user data, including most (many) user tools and applications.

/var/

Variable files--files whose contents are constantly changing in a functioning system, such as logs, Offline files, and temporary e-mail files. Sometimes it is a separate partition. If you do not partition separately, you may be able to fill the entire partition. If separate partition, give big to small not appropriate.

3 , /etc/ Catalogue

A specific host system-wide configuration file.

Directory

Describe

/etc/rc/etc/rc.d

/etc/rc*.d

The directory of scripts or scripts that is running when the run level is started, or changed.

/etc/hosts

Local Domain name resolution file

/etc/sysconfig/network

IP, mask, Gateway, host name configuration

/etc/resolv.conf

DNS server Configuration

/etc/fstab

Automatic mount system, all partitions will be automatically mounted on boot

/etc/inittab

Sets how the INIT process will set the system to runlevel and load the associated boot file configuration when the system starts

/etc/exports

Setting the configuration file path for NFS systems

/etc/init.d

This directory to hold the system startup script

/etc/profile , /etc/csh.login,/ETC/CSH.CSHRC

Global System Environment Configuration variables

/etc/issue

Pre-authentication output information, default output version kernel information

/etc/motd

Set the output information after authentication,

/etc/mtab

The list of file systems currently installed. Initialized by scripts and updated automatically by the Mount command. When you need a list of currently installed file systems, such as the DF command

/etc/group

Similar to/etc/passwd, but not the user but the group.

/etc/passwd

User database, where the domain gives the user name, real name, home directory, encrypted password, and other information of the user.

/etc/shadow

The shadow password file on the system on which the shadow password software is installed. The shadow password file moves the encrypted password in the/etc/passwd file to/etc/shadow, which is only readable by the root. This makes it more difficult to decipher the password.

/etc/sudoers

Configuration files that can be sudo commands

/etc/syslog.conf

System Log Parameter Configuration

/etc/login.defs

Set up files for user account restrictions

/etc/securetty

Confirm the security terminal, that is, which terminal allows root login. Typically only virtual consoles are listed, which makes it impossible (at least difficult) to break into the system via modem or network and gain superuser privileges.

/etc/printcap

Similar to/etc/termcap, but for printers. syntax is different.

/etc/shells

The list of trusted SHELL.CHSH commands allows the user to change the login shell within the scope specified in this file. Provides a service process for a machine FTP service FTPD checks whether the user shell is listed in the/etc/shells file, if the user is not allowed to log on.

/etc/xinetd.d

If the server is running in xinetd mode, its script will be placed in this directory. Some systems do not have this directory, such as Slackware, and some older versions do not. Available in the newer version of Redhat Fedora.

/etc/opt/

Configuration file for/opt/

/etc/x11/

Configuration file for X_window system (version 11)

/etc/sgml/

Configuration files for SGML

/etc/xml/

Configuration file for XML

/etc/skel/

When creating a user by default, copy the directory to the home directory

4 , /usr/ Catalogue

The default software will be stored in this directory. The second level for storing read-only user data, including the vast majority of user tools and applications.

Directory

Describe

/usr/x11r6

A directory for storing x-windows;

/usr/games

Store the small game that xteamlinux comes with;

/usr/doc

Linux technical documentation;

/usr/include

Used to store the header files needed to develop and compile applications under Linux;

/usr/lib

Store some common dynamic link shared libraries and static archives;

/usr/man

The directory where the Help document resides;

/usr/src

Linux Open source Code, there is this directory, enthusiasts do not let go oh;

/usr/bin/

Non-essential executables (not required in single-user mode), for all users.

/usr/lib/

/usr/bin/and/usr/sbin/libraries for binary files.

/usr/sbin/

Non-essential system binaries, such as: The daemon of a large number of network services.

/usr/share/

Architecture-Independent (shared) data.

/usr/src/

Source code, such as: Kernel source code and its header file.

/usr/x11r6/

X Window System version one, release 6.

/usr/local/

The third level of local data, specific to the host computer. In general, there are further subdirectories, such as: bin/, lib/, share/. This is the/USR directory provided to the general user, where the general application software is installed;

5 , /var/ Catalogue

/var includes data to be changed when the system is generally running. Each system is specific, i.e. it is not shared with other computers over the network.

Directory

Describe

/var/log/message

Log information, automatic polling by week

/var/spool/cron/root

Timer profile directory, default by user name

/var/log/secure

Document logging system access information, regardless of authentication success or authentication failure will be recorded

/var/log/wtmp

A file that records the login information, last,who,w command information from the source

/var/spool/clientmqueue/

When the mail service is not turned on, all messages that should be sent to the system administrator are stacked in this

/var/spool/mail/

Mail directory

/var/tmp

Temporary files that are larger or need to exist longer than/tmp. (Although the system administrator may not allow/var/tmp to have very old files.)

/var/lib

The file to be changed when the system is running normally.

/var/local

Variable data for programs installed in/usr/local (that is, programs installed by the system administrator). Note that if necessary, even locally installed programs use other/var directories, such as/var/lock.

/var/lock

Lock the file. Many programs follow the convention of creating a locked file in/var/lock to support their use of a particular device or file. Other programs Note that this lock file will not attempt to use this device or file.

/var/log/

Log files for various programs, in particular login (/var/log/wtmp log all to system log-in and logoff) and syslog (/var/log/messages store all core and System program information.) The files in the/var/log are constantly growing in uncertainty, Should be cleaned up regularly.

/var/run

The information file that is valid for the system before the next boot. For example,/var/run/utmp contains information about the user who is currently logged on.

/var/cache/

The application caches data. This data is a time-consuming I/O or calculation result that is generated locally. The application must be able to regenerate or restore data. Cached files can be deleted without causing data loss.

6 , /proc/ Catalogue

A virtual file system that archives the kernel and process state as a text file (System information is stored in this directory).

For example: uptime, network. In Linux, the corresponding PROCFS format is mounted. Files in this directory can only be viewed and cannot be changed (including root)

Directory

Describe

/proc/meminfo

View memory Information

/proc/loadavg

Do you remember top and uptime? That's right! The top three average values are recorded here!

/proc/uptime

is to use uptime time, will appear the information!

/proc/cpuinfo

Information about the processor, such as type, manufacturer, model, and performance.

/proc/cmdline

The relevant parameters released when loading kernel! Check out this file to see how the system started!

/proc/filesystems

Currently the system has been loaded by the file system ROM!

/proc/interrupts

Current IRQ assignment status above the system.

/proc/ioports

The I/O addresses configured on each of the devices above the current system.

/proc/kcore

This is the size of the memory! It's so big, right? But don't read him!

/proc/modules

Currently our Linux has loaded the list of modules can also be thought of as a driver!

/proc/mounts

The data that has been mounted by the system is the data that is called with the Mount command!

/proc/swaps

What is the memory where the system hangs and loads? Oh! The use of the partition is recorded here!

/proc/partitions

Using Fdisk-l will show all the partition right now? There is also a record in this document Oh!

/proc/pci

On the PCI bus top, the details of each device! Lspci can be used to check!

/proc/version

The core version is the content displayed with Uname-a!

/proc/bus/*

Some bus-line devices, as well as a U disk device is also recorded here Oh!

7 , /dev/ Catalogue

There are two types of device files: Block device file (b) and character device file (c)
The device files are generally stored in the/dev directory,

The common device files are described as follows:

Directory

Describe

/DEV/HD[A-T]

IDE Device

/DEV/SD[A-Z]

SCSI devices

/DEV/FD[0-7]

Standard Floppy Drive

/DEV/MD[0-31]

Soft RAID devices

/DEV/LOOP[0-7]

Local loopback device

/DEV/RAM[0-15]

Memory

/dev/null

Unlimited data reception devices, equivalent to black holes

/dev/zero

Unlimited 0 Resources

/DEV/TTY[0-63]

Virtual Terminal

/DEV/TTYS[0-3]

Serial

/DEV/LP[0-3]

and the port

/dev/console

Control Desk

/DEV/FB[0-31]

Framebuffer

/dev/cdrom

=/dev/hdc

/dev/modem

=/dev/ttys[0-9]

/dev/pilot

=/dev/ttys[0-9]

/dev/random

Random number devices

/dev/urandom

Random number devices

Linux system catalog (full and understandable)
http://ctohf.blog.51cto.com/4059147/907442

How to choose a teacher
http://dgd2010.blog.51cto.com/1539422/905783

Wrong thinking
http://tubeliu.blog.51cto.com/11766/903062

This article transferred from: http://blog.51cto.com/yangrong/1288072

Linux directory structure detailed description

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.