Description of files in Linux

Source: Internet
Author: User
Tags log log temporary file storage

/bin binary Executable command

/dev Device Special files

/etc system administration and configuration files

/ETC/RC.D startup configuration files and scripts

The base point of the home user directory, such as the user's home directory is/home/user, can be represented by ~user

/lib Standard Programming Library, also known as dynamic Link shared library, acts like a. dll file in Windows

/sbin System Management commands, which are stored in the hypervisor used by the system administrator

/tmp Common temporary file storage point

/root system Administrator's home directory (hehe, privileged Class)

The/MNT system provides this directory to allow users to temporarily mount other file systems.

/lost+found This directory is usually empty, the system is not properly shut down and leave the "Homeless" files (Windows called What. chk) here/proc the virtual directory, which is the mapping of the system memory. This directory can be accessed directly to

Get system Information.

/var overflow area for some large files, such as log files for various services

/usr The largest directory, the applications and files to be used almost all in this directory. These include:

/USR/X11R6 the directory where x window is stored

/usr/bin a multitude of applications

/usr/sbin Some management programs for super users

/usr/doc Linux Documentation

/usr/include the header files needed to develop and compile applications under Linux

/usr/lib Common dynamic-link libraries and package profiles

/usr/man Help Documentation

/USR/SRC source code, the Linux kernel source is placed in the/usr/src/linux

/usr/local/bin Local Add-on command

/usr/local/lib locally added Coogan file system Typically, the root filesystem occupies a small space, because most of the files do not need to be changed frequently, and include strict files and a small

Frequently changing file systems cannot be easily damaged. In addition to a possible system boot image called/V m L-N U-Z standard, the root directory generally does not contain any files. All other files are in subdirectories of the root file system.

Explain:



1. The/bin directory/b i n directory contains the commands required to boot boot or commands that may be used by ordinary users (possibly after boot boot). These commands are binary executable programs (b i n is b i n a r y--binary abbreviation),

Many are important system files in the system.

2./sbin directory/s b i n directories are similar to/bin and are also used to store binary files. Because most of these files are the basic system program used by the system administrator, although it is necessary and permissible for ordinary users, the general

Not available to ordinary users.

3./etc Directory/e T C directory contains a variety of system configuration files, including user information files/E t c/p a s S W D, System initialization files/E t c/r C, etc. L i n u x It is the files that are able to run normally.

4. The/root directory/root directory is the Superuser directory.

5. The/lib directory/L-B directory is the shared library required by the program on the root file system, which holds the shared files required for the root file system program to run. These files contain code that can be shared by many programs to avoid having each program contain the same

Sub-program, so you can make the executable file smaller and save space.

6. The/lib/modules directory/lib/modules directory contains system cores that can load various modules, especially those required to reboot the system when recovering a damaged system (such as network and file system drivers).

7. The/dev directory/d e v directory contains device files, which are device drivers that users access to external devices. For example, users can access the mouse input by accessing/d e v/m o u S e, just like accessing other

The same thing.

8./tmp directory store the information and data generated by the program at run time. However, after booting the boot, it is best to use/V a r/t m p instead of/TMP because the former may have a larger disk space.

9./boot directory/b o T directory holds the files used by the boot loader (bootstrap loader), such as L i l o, and the core image is often placed here, rather than in the root directory. But if there are many core images, this directory can be

Can become very large, it is better to use a separate file system. It is also important to ensure that the core image must be within the first 1 0 2 4 cylinders of the I-D e-drive.

/mnt directory/m n T directory is the installation point of the system Administrator's temporary installation (M o u n T) file system. The program does not automatically support installation to/mnt. /MNT can be broken down into many subdirectories, such as/mnt/dosa, which may be

With M s d o s file system floppy drive, while/mnt/exta may be using the E x T 2 file system floppy drive,/mnt/cdrom optical drive and so on.

/OPT here are the main storage of those optional programs. Do you want to try the latest Firefox beta? Put it in the/opt directory, so that when you're done trying to erase Firefox, you can simply delete it without affecting the system

Any other settings. The program installed in the/OPT directory, all of its data, library files, etc. are placed under the same directory. For example: Just installed the beta version of Firefox, can be installed in the/opt/firefox_beta directory,/

The Opt/firefox_beta directory contains all the files, libraries, data, and so on that are needed to run Firefox. To remove Firefox, you can simply delete the/opt/firefox_beta directory.

Here is a detailed description:

/etc File System

The/etc directory contains a variety of system configuration files, some of which are described below. Other you should know which program they belong to 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 A directory that starts, or alters, a script or script that runs at run-time.

2./etc/passwd user database, where the domain gives the user name, real name, user start directory, encrypted password, and other information of the user.

3./ETC/FDPRM floppy parameter table to illustrate different floppy disk formats. Can be set with SETFDPRM. See the help page for S e t f D p R m for more information.

4./ETC/FSTAB Specifies the list of file systems that need to be installed automatically at startup. Also includes information for the S W P zone enabled with Swapon-a.

5./etc/group is similar to/etc/passwd, but it does not describe the user information but the group information. Includes various data for the group.

6./etc/inittab init configuration file.

7./etc/issue includes the user's output information before the login prompt. Usually includes a short description of the system or a welcome message. Specific content is determined by the system administrator.

8./etc/magic "F i l E" configuration file. Contains a description of the different file formats, "F i l E" based on it guessing the file type.

9./ETC/MOTD m O T D is the abbreviation for message of the day, and the user automatically outputs after successful login. The content is determined by the system administrator. Often used to advertise information, such as warnings for scheduled shutdown times.

/etc/mtab the list of currently installed file systems. Initialized by the script (s C r i t p) and updated automatically by the Mount command. Used when a list of currently installed file systems is required (for example, the DF command).

/etc/shadow a shadow password file on a system with shadow (s h a d o W) password software installed. The shadow password file moves the encrypted password in the/E T c/p a s S W d file to the/E t/s h a D o W, and then

Only the Superuser (R o O T) is readable. This makes it more difficult to decipher the password, which increases the security of the system.

Configuration file for the/etc/login.defs l o g i n command.

/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 b o u r n E or c shells executed file. This allows the system administrator to establish a global default environment for all users.

/etc/securetty confirms the security terminal, that is, which terminal allows Superuser (r o o T) to log in. Typically only virtual consoles are listed, which makes it impossible (at least difficult) to break into the system via modem (M o d e m) or network

and get super User privileges.

/etc/shells Lists the S H e l l that can be used. The CHSH command allows the user to change the login's S H e L, within the scope specified in this file. Service process to provide a machine F T P service ftpd Check if user s H e l L is listed in/etc/

Shells file, if it is not, the user will not be allowed to log on.

/ETC/TERMCAP Terminal Performance database. Describes what "escape sequence" controls are used by different terminals. Instead of outputting the escape sequence directly (so that it works only with a particular brand of terminal), it looks for the/etc/termcap from the

The correct sequence of work. 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, which is described in the device list. Device files are 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 the system administrator for local device files (or connections) (such as some non-standard device drivers that are not part of the standard Makedev). Below is a brief introduction/d e v Some of the commonly used files.

1./dev/console system console, which is a direct and system connected monitor.

2./dev/hd i d e hard drive driver interface. For example:/d e v/h D a refers to the first hard drive, and H a D 1 refers to the first partition of/d e v/h D a. If there are other hard drives in the system, then/d e v/h D

b,/d e v/h D C 、...... , if there are more than one partition, in turn, 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 be accessed/d e v/h a D, but access/d e v/s D a.

4./DEV/FD floppy drive device driver. such as:/d e v/F D 0 refers to the system's first floppy disk, which is usually said 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 the 4 in drive 1. 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 second Virtual Console of the system.

7./DEV/PTY provides remote login pseudo terminal support. The/d e v/p T y device is required to log in with Te L n e T.

8./dev/ttys computer serial interface, for D o S is "c o M 1" port. 9./dev/cua the computer serial interface, the device used with the modem.

/dev/null "Black hole", all information written to the device will disappear. For example: When you want to hide the output information on the 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 this file system is very large, because all programs are installed here. All files in/usr generally come from l i n u x release (d i s t r i b u t i o n); locally installed programs and other things in/

Usr/local, because this allows you to upgrade the new system or release without reinstalling all the programs. Many of the content in the/usr directory is optional, but these features make it more efficient for users to use the system. /U S R can accommodate many

Large packages and their configuration files. Some important directories are listed below (some of the less important directories have been omitted).

1./USR/X11R6 contains all executable programs, configuration files, and supporting files for the x wi n d o w system. To simplify the development and installation of x, files for x are not integrated into the system. The x wi n d o W system is a powerful graphics ring

and provides a large number of graphical tool programs. Users who are familiar with Microsoft WI n d o w s or m a c h i n t o S H will not be overwhelmed by the x wi n d o w system.

2./usr/x386 similar/u S r/x 11r6, but is dedicated to x one release 5.

3./usr/bin centralizes almost all user commands and is the system's software library. Some other commands are in/bin or/usr/local/bin.

4./usr/sbin includes unnecessary system administration commands 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 man pages, G-N u information documents, and various other document files. Each online manual has two subdirectories for the section. Example:/u S r/m a n/

M a n 1 contains the source code for the first section of the online manual (no formatted original file),/U S r/m a n/c a T 1 contains the contents of the first section that has been formatted. The online manual is divided into the following nine sections: internal commands, system calls, library functions,

devices, file formats, games, macro packages, System management, and core programs.

6./usr/include contains the C language header files, which are many. H ends with a description of the data structure, sub-procedures, and constants used in the C language program. In order to maintain consistency, this should actually be placed under/usr/lib, but it is customary to

The name has been used.

7./usr/lib contains the immutable data files of the program or subsystem, including some s i t e-w i d e profiles. The name L I b originates from the library; The original library of programming also exists in/usr/lib. When the program is compiled, the program will

Where the libraries are connected. There are also a number of programs that store configuration files.

8./usr/local locally installed software and other files are placed here. This is very similar to/U S R. Users may find some of the larger packages, such as T e X, E m a C s, and so on.

/var file system

/var contains data to be changed when the system is generally running. Usually the size of the directory in which the data resides is constantly changing or expanding. Some contents of the original/V a R catalog are in/U S R, but in order to maintain the relative stability of the/U S R directory

The directories that need to be changed frequently in/V a R. Each system is specific, i.e. it is not shared with other computers over the network. Some important directories are listed below (some of the less important directories are omitted).

1./var/catman includes the formatted Help (m a N) page. The source file of the help page is generally present/U s r/m a n/m a n; some m a n pages may have a pre-formatted version, present/U S r/m a n/c a T

In While the other M-N pages need to be formatted for the first time, the formatted version exists in/var/man, so that other people can look at the same page without waiting for formatting. (/var/catman is often cleared, just like clear pro

The same time directory. )

2./var/lib the file to be changed when the system is in normal operation.

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

4./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 notice that the lock file is no longer used

This device or file.

5./var/log log of various programs (L o g) files, in particular login (/var/log/wtmp log records all to system logon and logoff) and Syslog (/var/log/messages Records store all core and System program letters

and the rest). The files in the/var/log often grow in uncertainty and should be cleaned up regularly.

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

7./var/spool the directory where the "spool (s P o L)" program is placed, such as M a I l, n e w s, print queue and other queue working directory. Each of the different s P o L has its own subdirectory under/var/spool, for example, the user

Mailbox is stored in the/var/spool/mail.

8./VAR/TMP than/TMP allows for larger or more temporary files that need to exist for a longer period of time. Note system administrators may not allow/var/tmp to have very old files.

/proc File System

The/proc file system is a pseudo file system, which means that it is a directory that does not actually exist, so this is a very special directory. It does not exist on a disk, but is generated in memory by the core. This directory is used to raise

Information about the system. Here are some of the most important files and directories (the/proc file system is described in more detail in the proc man page).

1./proc/x The directory of information about process X, which is the identification number for this process. Each process has a directory called its own process number under/proc.

2./proc/cpuinfo store the information of the processor (C p u), such as the type of C p u, manufacturer, model, and performance.

3./proc/devices the list of device drivers for the currently running core configuration.

4./PROC/DMA Displays the currently used D-M channel.

5./proc/filesystems the file system information for the core configuration.

6./proc/interrupts Displays the information about the interrupt information and occupants that are occupied, and the amount that is occupied.

7./proc/ioports the I/O port currently in use.

8./proc/kcore system physical memory image. It is exactly the same size as the physical memory, but it does not actually occupy so much memory; it is only created when the program accesses it. (Note: Unless you copy it to somewhere, otherwise/

Nothing takes up any disk space under Proc. )

9./proc/kmsg the core output message. will also be sent to S Y S l o G.

/proc/ksyms core symbol table.

One./proc/loadavg system "average load"; 3 meaningless indicators indicate the current workload of the system.

/proc/meminfo various memory usage information, including physical memory and swap partition (s w a P).

/proc/modules stores which core module information is currently loaded.

/proc/net Network protocol status information.

/proc/self Store the symbolic connection to the process directory of the program that is viewing the/proc. When 2 processes view/proc, this will be a different connection. This is primarily convenient for the program to get its own process directory.

The different states of the/proc/stat system, for example, the number of times a page error occurred after the system started.

/proc/uptime the length of time the system starts.

/proc/version Core version.

Description of files in Linux

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.