Go A summary of important subdirectories and contents of Linux system

Source: Internet
Author: User
Tags system log

A summary of important subdirectories and contents of Linux system

Original: http://blog.csdn.net/xiaolong361/article/details/52318834

1. First introduce some important directories under the root directory meaning note: It is more important to be tagged.

Directory

Description

/bin

Commonly used binary command directories. such as LS CP mkdir, and so on, and/usr/bin similar.

/boot

The directory of files required by the Linux kernel and boot system programs. When installing the system partition, it is usually divided into a boot partition. The common partition is:/boot 200M swap memory 1.5 times times, the rest is given/.

/dev

Device files directory, such as sound card, disk, optical drive, etc.

/etc

The configuration file default path for the binary installation package and the directory where the service startup command resides.

/home

Home directory default data storage directory for normal users.

/lib

Library file storage Directory

/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 there is a problem with the system, there may be files being moved to this directory, which may need to be repaired manually or moved to the original location of the file.

/mnt

Typically used to temporarily mount a storage device mount directory, such as a cdrom,u disk directory, directly inserted into the optical drive can not be used, to be mounted after use.

/opt

Indicates the optional meaning, some packages will also be installed here, that is, custom software packages, our own compiled packages can be installed in this directory, through the source package installed software can be through the./configure--prefix=/opt/directory, not required, Subject to custom or specification.

/proc

When the operating system is running, process information and kernel information (such as CPU, hard disk partition, memory information, etc.) are stored here. The/proc directory is a mounted directory of the disguised file system proc, Proc is not a real filesystem, and its definition can be found in/etc/fstab.

/root

Home directory for Linux super User root.

/sbin

Most of the commands that involve system administration are stored, which is the super-user root executable command repository, and this directory is similar to the/usr/sbin,/usr/x11r6/sbin or/usr/local/sbin directory.

/tmp

Temporary file directory, sometimes when the user runs the program, it generates temporary files. /tmp is used to store temporary files, the permissions are very special.

/usr

This is the directory of system storage programs, such as commands, help files and so on. There are a lot of files and directories under this directory. When we install a Linux distribution that is officially provided by the package, it is mostly installed here. If a server configuration file is involved, the configuration file is installed in the/etc/directory. The/usr directory includes the font directory/usr/share/fonts, help directory/usr/share/man or/usr/share/doc, normal user executable file directory/usr/bin/or/usr/local/bin or/usr/ X11r6/bin, such as/usr/sbin,/usr/x11r6/sbin,/usr/local/sbin, as well as the program's head file storage directory/usr/include.

/var

The contents of this directory is constantly changing, see the name to know, we can understand as vary abbreviation,/var under/var/log This is used to store the system log directory, System log path/var/log/messages. The/var/www directory is the directory where the Apache server site is defined, and/var/lib is used to store some library files, such as MySQL, where the MySQL database has been stored.

2. Some important directories and documents in the/etc directory

sets the corresponding table for the user IP and first name (or domain name), which corresponds to the local LAN internal DNS.

Note: Win's Hosts file address: C:\windows\system32\drivers\etc\ Hosts

the role of the hosts enterprise

1, developer, product, test, etc, used to test the product through a formal domain name

2, the server between the call can use the Domain name (internal DNS), easy to migrate.

implement a file on the Mount file system

Span style= "COLOR: #ff0000" > fstab If a configuration error causes the server to fail to start, how to fix

blkid

/dev/sda1:uuid= "096811ee-d34a-4b73-becb-8387ed1bbb46" type= "Ext4"
Span style= "COLOR: #ff0000" >/dev/sda2:uuid= "f039c1a6-6bd2-428b-9173-f3b688f5509c" type= "XFS"
/dev/sda3:uuid= "I60jql-ddaf-wzap-w4ml-k5ia-jhz7-pzdfyg" type= "Lvm2_member"

The first column of the device mounted, but the device name or UUID, or disk label.

TD valign= "Top" width= "412" > TD valign= "Top" width= "412" >

Directory

Description

/etc/sysconfig/network-scripts/ifcfg-eth0

Configure network addresses and GW.

/etc/resolv.conf

Set the client DNS for this computer

/etc/hosts

/etc/sysconfig/network

to modify the machine name and network card startup configuration.

simultaneous modification:

1./etc/sysconfig/network

2.hostname host name

/etc/fstab

/etc/inittab

Sets how the INIT process will set the system to RunLevel and load related startup file settings when the system starts.

/etc/exports

Sets the configuration file path for the NFS system.

/etc/init.d

This subdirectory is used to store scripts that are launched by the system or server in System V mode, which is common in systems that are started or initialized in Mode v. Like Centos/redhat.

/etc/xinit.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. In Redhat/fedora, a newer version exists in the comparison.

/etc/profile

The system global variable configuration path.

/etc/issue

Record the information displayed before the user logs in

/etc/motd

each time a user logs on, the contents of the/ETC/MOTD file are displayed in the user's terminal .

/etc/group

Set the user's group name and related information

/etc/passwd

Account information

/etc/shadow

Password information

/etc/sudoers

configuration file for sudo command

/etc/securetty

Set which endpoints can have root login

/etc/login.defs

Default configuration for all users when they log on

/etc/modprobe.conf

Additional parameter settings for kernel modules

/etc/rsyslog.conf (5 Series for syslog.conf)

Log settings file

/etc/dir_colors

Set color

/etc/host.conf

The file describes how the user's system queries the node name, and the default order Hosts,bind

/etc/hosts.allow

To set up a machine that allows the use of inetd

/etc/hosts.deny

Setting up a machine that does not allow the use of inetd

/etc/protocols

System-Supported protocol files

/etc/x11

X Window's configuration file

/etc/re.local

A file that is used to hold the power-on Self-launcher command (CHKCONFI is used to manage the boot-up of services for yum/rpm installed programs). Self-developed programs used to put the start command into the/etc/rc.local, the implementation of the boot start these programs, Linux boot will be/etc/rc.local inside the contents of the execution once.

How to use the Enterprise: Chkconfig and/etc/rc.local, you can choose/etc/rc.local Server files.

3. Some important directories and file descriptions under the/var directory

Directory

Description

/var

Log file

/var/log

Various System log storage location

/var/log/messages

System Information default log file, very important, automatic polling by week

/var/log/secure

Records log in the system to store information files, weekly automatic polling, such as POP3,SSH,TELNET,FTP, etc. will be recorded here.

/var/log/wtmp

Document that logs the information of the lander, last

/var/spool/cron

Scheduled Tasks crontab The default directory, a file that is named by the user name.

/var/spool/mail

System User mail Storage directory

/var/spool/clientmqueue

Temporary mail file directory, there are many reasons for this directory is a lot of broken files, such as crontab timed task commands do not add >/dev/null, etc., occasionally in the work because the directory file too many, resulting in the/var/partition inode number is consumed, unable to write to the file.

/var/lib/rpm

RPM Kit Installation Place

4. Some important directories and file descriptions under the/usr directory

Directory

Description

/usr/bin

This directory is a directory of executable programs, and when we install a program from the system's own package, most of his executables are placed in this directory. A similar directory is/usr/local/sbin

/usr/sbin

This directory is also a directory of executable programs, but mostly contains commands that involve system administration; similar directories are/usr/local/sbin or/usr/x11r6/sbin.

/usr/local

This directory is generally used to store the user self-compiled installation software storage directory, usually through the source package installed software, if not specifically designated installation directory, is generally installed in this directory. Equivalent to C:\Program files

/usr/local/bin

User-installed small applications, and some symbolic links to large applications in the/usr/local directory.

/usr/local/sbin

System Global Environment directory, you can put some scripts that do not need to add path execution, and so on.

/usr/share

Things that the system uses to store, such as/usr/share/doc and/usr/share/man help files.

/usr/src

Kernel source storage directory, such as the following kernel source directory, such as Linux,linux-2.xxx. XX directory and so on.

/usr/bin

The directory of binary file that the consumer can execute.

/usr/lib &&/usr/local/lib

Library of functions to be used by the system.

5. Some important catalogues and document descriptions under the/proc catalogue

Directory

Description

/proc

Virtual directory, which is a mapping of memory

/proc/version

Kernel version

/proc/sys/kernel

System kernel functions

/proc/cpuinfo

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

/proc/meminfo

System Memory Information

/proc/devices

The list of all devices configured by the current running kernel.

/proc/dma

DMA channel currently in use

/proc/filesystems

The file system configured by the current running kernel

/proc/initerrupts

The interrupt being used, and how many interrupts were there.

/proc/ioports

The I/O port that is currently in use.

/proc/loadavg

System load information, uptime results.

Go A summary of important subdirectories and contents of Linux system

Related Article

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.