The meaning and function of Linux folders __linux

Source: Internet
Author: User
Tags system log
Turn from: http://blog.chinaunix.net/uid-22018363-id-407691.html
1.linux the meaning of each folder:
/bin: is a binary abbreviation that contains the commands needed to boot the system and common commands that ordinary users can use
/lib: A shared library of programs and core modules under the root file system directory, which holds the root file system program
Run the shared files that you want. These files contain code that can be shared by many programs
To prevent each program from having a copy of the same subroutine
This can make the executable file smaller and save space.
/ETC: Used to store all the configuration files and subdirectories required for system management, Linux just because these files are running properly
/MNT: This directory is empty, the system provides this directory is lets the user temporarily mount other file system
/boot: Here are some of the core files used to start Linux, boot loader (bootstrap loader) such as Lilo
These files are used and are loaded first when the computer is started. This directory will also contain the Linux kernel (compressed file vmlinuz)
But Linux cores can also exist elsewhere, as long as you configure LILO and Lilo knows where the Linux kernel is.
/sbin:s is the meaning of super user,/sbin directory similar to/bin, also used to store binary files.
But most of them are the basic system management programs used by system administrators
/root the home directory of the system administrator (Superuser or root user).
/dev: This directory is all Linux external device files, its function is similar to DOS under the. SYS and win under the. vxd, the user can
Access to external devices through these files, and devices and files are accessed in Linux in the same way. For example:/dev/hda represents the first physical IDE hard disk.
/tmp: for storing temporary files. Programs that run after boot startup should use/VAR/TMP instead of/tmp
Because the former may be on a disk with more space and the directory will be automatically cleaned up.
/var: This catalogue holds things that are constantly expanding in order to maintain the relative stability of/usr
The directories that are often modified can be placed in this directory, and many system administrators actually do this.
Incidentally, the system log file is in the/var/log directory.
/lost+found: This directory is usually empty, when the system is not properly shutdown
This has become a refuge for some homeless documents.
Somewhat similar to the. chk file under DOS.
/proc: This directory is a virtual directory, which is the mapping of system memory, we can access this directory directly to obtain system information
In other words, the contents of this directory are not on the hard drive but in memory.
/usr The largest directory, the applications and files to be used are almost all in this directory
/usr/bin a wide range of applications
/usr/sbin Some management programs for super users
/usr/doc Linux Documentation
/usr/lib commonly used dynamic-link libraries and package configuration files
/usr/man Help Document
/USR/SRC Linux Open source, such as the Linux kernel source code is placed in the/usr/src/linux
/usr/local/bin locally added command
/usr/local/lib locally added libraries
2. Detailed description below;
/ETC File System
The/ETC directory contains a variety of system configuration files, some of which are described below. The rest, you should know which one they belong to.
program, and read the program's M a n page. Many network configuration files are also in/etc.
1./ETC/RC or/etc/rc.d or/ETC/RC? D
The directory of scripts or scripts that run when the run level is started, or changed.
2./etc/passwd
User database, where the domain gives the username, the real name, the user's starting directory, the encryption password, and the user's
him information.
3./ETC/FDPRM
The floppy disk parameter table that describes the different floppy disk formats. Can be set with SETFDPRM. For more information see S e t f D p R m
's help page.
4./etc/fstab
Specifies the list of file systems that need to be installed automatically at startup. Also includes information on the S W a p area enabled with Swapon-a.
5./etc/group
Similar to/etc/passwd, but not the user information but the group information. Includes various data for the group.
6./etc/inittab
The configuration file for init.
7./etc/issue
Includes the user's output information before the logon prompt. Usually includes a short description of the system or a welcome message. In particular
The capacity is determined by the system administrator.
8./etc/magic
The configuration file for "F i l E". Contains a description of the different file formats, "F i l E" based on its guessing file type.
9./ETC/MOTD
M o D is the abbreviation for message of the day, which is automatically exported after the user successfully logs in. The content is determined by the system administrator.
Often used to advertise information, such as warnings about scheduled shutdown times, and so on.
/etc/mtab
List of currently installed file systems. Initialized by the script (s C r i t p) and automatically updated by the Mount command. When you need a
A list of currently installed file systems (for example, the DF command).
/etc/shadow.
Shadow password file on a system with shadow (s h a d o W) password software installed. Shadow password file will/E t c/p a s W d
The encrypted password in the file is moved to/E t C/s h a D o W, and the latter is readable only for the superuser (r o T). Which makes deciphering the password more difficult.
Difficult to increase the security of the system.
/etc/login.defs
L o g i n command configuration file.
/etc/printcap
Similar to/etc/termcap, but for printers. syntax is different.
/etc/profile,/E t/C s H. L o g i n,/ETC/CSH.CSHRC
Log on or start when B o u r n E or C shells executes the file. This allows the system administrator to establish a global default environment for all users.
/etc/securetty
Confirm the security terminal, which terminal allows the superuser (r o T) to log in. Typically, only the virtual Console is listed so that it does not
It is possible (at least difficult) to break into the system via a modem (M o d e m) or network and gain superuser privileges.
/etc/shells
List the available S H e L. The CHSH command allows the user to change the login s H e l l in the specified scope of this document. Provide a
Machine f T P service process FTPD Check whether the user S H e l L is listed in the/etc/shells file, if not, will not be acceptable
The user is allowed to log on.
/etc/termcap
Terminal Performance database. Describes what "escape sequence" controls are used by different terminals. Do not output escape directly when writing programs
Sequence (which works only with a specific brand of terminals), but instead finds the correct sequence of work to do from the/etc/termcap.
In this way, most programs can run on most terminals.
/dev File system
The/dev directory includes device files for all devices. The device file is named with a specific convention, as described in the device list.
The device file is generated by the system during installation and can be described later with/dev/makedev. /d e v/m a k e d e v.local is
A descriptive document written by a system administrator for a local device file (or connection) (as some non-standard device drivers are not standard
Part of the Makedev). Below is a brief introduction to some of the common files below/d e v.
1./dev/console
System console, which is a monitor connected directly to the system.
2./dev/hd
I d e HDD driver interface. For example:/d e v/h D a refers to the first hard drive, h a D 1 means/d e v/h D a first
Partition. If there are other hard drives in the system, then/d e v/h D B,/d e v/h D C 、...... If more than one partition is followed by the
H d A 1, h D a 2 ...
3./DEV/SD
s C S I disk driver interface. If the system has s C s I hard drive, it will not access/d e v/h a D, but will access/d e v/s D a.
4./dev/fd
Floppy drive device driver. For example:/d e v/f D 0 refers to the system's first floppy disk, which is usually called a: disk,
/d e v/f D 1 refers to the second floppy disk, ... and/d e v/f d 1 h 1 4 4 0 indicates access to 1 in drive 4. 5 High density disk.
5./dev/st
s C S I tape drive driver.
6./dev/tty
Provides Virtual Console support. such as:/d e v/t T y 1 refers to the system's first Virtual Console,/d e v/t T y 2 is the system
The second Virtual Console.
7./dev/pty
Provide remote login pseudo terminal support. The/d e v/p T-y device is used when you log on te l n e T.
8./dev/ttys
Computer serial interface, for D o S is "c o M 1" port.
9./dev/cua
A computer serial interface, a device used with a modem.
/dev/null
"Black hole", all information written to the device will disappear. For example, when you want to hide the output information on your screen
, simply enter the output information into the/d e v/n u l L.
/usr file system
/usr is a very important directory, usually a large file system, because all programs are installed here. In/usr.
All files generally come from L i n u x distributions (d i s t r i b u t i o n); locally installed programs and other things are under/usr/local, because this allows you to upgrade a new system or release without having to reinstall all programs. Many of the contents of the/usr directory are
Optional, but these features make it more efficient for users to use the system. /U S R can accommodate many large packages and their configurations
File. Some important directories are listed below (some of the less important directories are omitted).
1./usr/x11r6
Contains all executable programs, configuration files, and supporting files for x WI n d o systems. To simplify the development and installation of X,
X's files are not integrated into the system. X wi n d o W system is a powerful graphical environment that provides a large number of graphics
Tool program. If the user is familiar with Microsoft WI n d o w s or m a c h o s H, it will not be able to feel helpless with the x wi n d o w system.
2./usr/x386
Similar to/U S r/x 11r6, but is specifically for x one release 5.
3./usr/bin
Centralized almost all user commands, is the system's software library. Some other commands are in/bin or/usr/local/bin.
4./usr/sbin
Includes system management commands that are not necessary for the root file system, such as most service programs.
5./usr/man,/U s r/i n f o,/u S r/d o C
These directories contain all the man pages, G n u information documents, and various other document files. "section" of each online manual
have two subdirectories. For example:/u S r/m a n/m a N 1 contains the source code in the first section of the online manual (no formatted original text
,/U S r/m a n/c a T 1 contains the formatted contents of the first section. The online manual is divided into the following nine sections: Internal commands, System tuning
Use, library functions, devices, file formats, games, macro packages, System management, and core programs.
6./usr/include
Contains the C language header files, which are more than a few files. H to describe the data structure used in the C language program,
Child procedures and constants. In order to maintain consistency, this should actually be placed under/usr/lib, but it is customary to use this name
Word.
7./usr/lib

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.