The role of each folder under the CentOS system

Source: Internet
Author: User
Tags temp file storage ide hard drive

The file structure under Linux to see what each folder is used for:

/bin binary executable command/Dev Device Special files/etc System Management and configuration Files/etc/rc.d startup configuration files and scripts/home User main base point, such as user's home directory is/home/user, can use ~User represents/LIB Standard program Design library, also called 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/temp file storage points common to TMP/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 (what is called under Windows. chk) right here./proc A virtual directory, which is a mapping of system memory. This directory can be accessed directly to obtain system information. /varoverflow zones for some large files, such as log files for various services/usr's largest directory, applications and files to be used in almost all of this directory. These include:/usr/X11R6 the directory where x window is stored/usr/bin multitude of applications/usr/sbin Some management programs for super users/usr/Doc Linux Documentation/usr/include the header files required to develop and compile applications under Linux/usr/lib common dynamic link libraries and configuration files for software packages/usr/Man Help documentation/USR/SRC source code, the Linux kernel code is placed in the/usr/src/in Linux/usr/local/Local Add command for bin/usr/local/lib local additions to the library

Typically, the root filesystem occupies a smaller space because most of the files do not need to be changed frequently, and include strict files and a small, infrequently changed file system that cannot be easily damaged. In addition to a possible system boot image called the/vmlinuz standard, the root directory generally does not contain any files. All other files are in subdirectories of the root file system.

1. The/bin:/bin directory contains commands that are required for boot startup or commands that may be used by ordinary users (possibly after boot boot). These commands are executable programs for binary files (b i n is b i n a r y--binary abbreviation), most of the system is an important system file. 2. /sbin:/sbin Directory Similar/bin, also used to store binary files. Since most of these files are the basic system programs used by the system administrator, they are generally not used by ordinary users, although they can be used when necessary and permissible. 3. /ETC:/ETC directory contains a variety of system configuration files, including user information file/etc/passwd, System initialization file/ETC/RC and so on. Linux is the *These files can be run normally. 4. /root:/The root directory is the Super User directory. 5. /lib:/The Lib 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 prevent each program from having a copy of the same subroutine, making the executable smaller and space-saving. 6. /lib/modules:/lib/The modules directory contains system cores that can load various modules, especially those needed to reboot the system when recovering a damaged system (for example, network and file system drivers). 7. The/dev:/dev directory stores device files, which are device drivers, through which users access external devices. For example, users can access/dev/by accessing themouse to access the mouse input, just like accessing other files. 8. The/tmp:/tmp directory stores the information and data generated by the program at run time. However, after booting, it is best to run the program using/var/TMP to replace/TMP, because the former may have a larger disk space. 9. The/boot:/boot 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 become very large, and it would be better to use a separate file system. It is also important to ensure that the core image must be in the top 1 of the I-D e-drive0 24 in the cylindrical surface. Ten. The/MNT:/MNT directory is the installation point of the system Administrator temporary installation (mount) file system. The program does not automatically support installation to/mnt. /MNT below can be divided into many subdirectories, such as/mnt/dosa may be using the Msdos file system floppy drive, and/mnt/exta may be using the Ext2 file system floppy drive,/mnt/CDROM optical drive and so on.  One. /proc,/usr,/var,/home: The installation point for other file systems.

Detailed Description:
/ etc File system :/etc directory contains various system configuration files, some of which are described below. Other you should know which program they belong to and read the man page of the program. 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 SETFDPRM help page for more information. 4. /etc/fstab: Specifies the list of file systems that need to be installed automatically at startup. Also included with Swapon-A enables the S w a P-zone information. 5. /etc/group: Similar to/etc/passwd, but not the user information but the group information. Includes various data for the group. 6. /etc/the Inittab:init configuration file. 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. Specific content is determined by the system administrator. 8. /etc/Magic: The configuration file for "file". Contains a description of the different file formats, and "file" guesses the file type based on it. 9. /etc/MOTD:MOTD is the message of the day, which is automatically exported after the user has successfully logged in. The content is determined by the system administrator. Often used to advertise information, such as warnings for scheduled shutdown times. Ten. /etc/mTAB: List of currently installed file systems. Initialized by the script (SCRITP) and updated automatically by the Mount command. Used when a list of currently installed file systems is required (for example, the DF command).  One. /etc/shadow: Shadow password file on the system on which the Shadow (shadow) password software is installed. The shadow password file moves the encrypted password in the/etc/passwd file to/etc/Shadow, the latter is only readable by superuser (root). This makes it more difficult to decipher the password, which increases the security of the system.  A. /etc/the configuration file for the Login.defs:login command.  -. /etc/printcap: Similar to/etc/termcap, but for printers. syntax is different.  -. /etc/profile,/etc/csh.login,/etc/CSH.CSHRC: File executed at login or start b o u r n E or C shells. This allows the system administrator to establish a global default environment for all users.  the. /etc/Securetty: Confirm the security terminal, that is, which terminal allows superuser (root) to log in. Only virtual consoles are generally listed, which makes it impossible (at least difficult) to break into the system via a modem or network and gain superuser privileges.  -. /etc/shells: Lists the shells you can use. The CHSH command allows the user to change the login shell 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), the program looks for the correct sequence of work to be done from/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, which is described in the device list. Device files are generated by the system during installation and can be described later with/dev/makedev. /dev/makedev.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 to some of the commonly used files in/dev.

1. /dev/Console : The system console, which is a direct and system-attached monitor. 2. /dev/hd:ide hard drive driver interface. such as:/dev/hda refers to the first hard disk, had1 refers to the first partition of/dev/hda. If there are other hard disks in the system, then/dev/hdb,/dev/hdc 、...... If more than one partition is hda1, hda2 ... 3. /DEV/SD:SCSI disk driver interface. If a system has a SCSI hard disk, it will not access the/dev/had and will access the/dev/SDA. 4. /DEV/FD: Floppy drive device driver. such as:/dev/fd0 refers to the system's first floppy disk, which is usually said a: disk,/dev/fd1 refers to the second floppy disk, ... and/dev/The fd1h1440 represents access to 4.5 High-density disks in drive 1. 5. /dev/ST:SCSI tape drive driver. 6. /dev/tty: Provides Virtual Console support. such as:/dev/tty1 refers to the system's first Virtual Console,/dev/The Tty2 is the second Virtual Console of the system. 7. /dev/pty: Provides remote login pseudo terminal support. Use/dev/when Telnet is logged inPty Equipment. 8. /dev/ttys: Computer serial interface, for DOS is "COM1" port. 9. /dev/CUA: A computer serial interface, a device used with a modem. Ten. /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/dev/null.

/ 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 the L i n u x release (distribution), locally installed programs and other things under/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. /usr 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 Xwindow system. To simplify the development and installation of x, files for x are not integrated into the system. The Xwindow system is a powerful graphical environment that provides a large number of graphical tool programs. Users who are familiar with Microsoft Windows or Machintosh will not be overwhelmed by the Xwindow system. 2. /usr/x386: Similar to/usr/X11R6, but was specifically given to X11 release 5. 3. /usr/bin: Centralized almost all user commands, is the software library of the system. Some other commands are in/bin or/usr/local/the bin. 4. /usr/sbin: Includes unnecessary system administration commands for the root file system, such as most service programs. 5. /usr/man,/usr/info,/usr/Doc: These directories contain all manual pages, G-N u information documents, and various other document files. Each online manual has two subdirectories for the section. For example:/usr/man/man1 contains the source code for the first section of the online manual (no formatted original file),/usr/man/CAT1 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, these files are more. 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 put in/usr/Lib, but it's customary to use the name. 7. /usr/lib: Contains the immutable data files of the program or subsystem, including some site-wide configuration files. The name L I b originates from the library; The original library of programming also exists/usr/Lib. When the program is compiled, the program connects to the library. 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 Tex, Emacs, and more.

/ 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 of the contents in the/var directory are in/usr, but in order to maintain the relative stability of the/USR directory, the directories that need to be changed frequently are placed in/V a R. Each system is specific, i.e. it is not shared with other computers over the network.

1. /var/catman: Includes the formatted Help (man) page. The source file for the help page is generally present in/usr/man/man, and some man pages may have a pre-formatted version, which exists in/usr/man/cat. While the other man pages need to be formatted for the first time, the formatted version exists/var/man, so that other people look at the same page without having to wait for formatting. (/var/Catman are often cleared, just as the temporary directory is cleared. ) 2. /var/Lib: The file to be changed when the system is running normally. 3. /var/local: Variable data that holds programs installed in the/usr/local (that is, programs installed by the system administrator). Note that if necessary, even locally installed programs use other/vardirectory, e.g./var/Lock. 4. /var/Lock: Locks the file. Many programs follow the/var/LockTo support the use of a particular device or file by creating a contract to lock the files. Other programs will not use this device or file when they notice the lock file. 5. /var/log: Log of various programs (L o g) files, especially login (/var/log/wtmp log records all login and logoff to the system) and syslog (/var/log/messages Records store all core and System program information). /var/the files in log often grow in uncertainty and should be cleaned up regularly. 6. /var/run: The information file about the system that is valid before the next system boot is guaranteed. For example,/var/run/utmp contains information about the user who is currently logged on. 7. /var/spool: A 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 directories. Each of the different s P o L in the/var/spool has its own subdirectory, for example, the user's mailbox is stored in the/var/spool/in Mail. 8. /var/tmp: A temporary file that is larger than/TMP and that requires a longer time to exist. Note system administrators may not allow/var/tmp has 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 provide 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 information directory for process X, which is the identification number for this process. Each process in the/proc has a directory called its own process number. 2. /proc/Cpuinfo: Information that holds the processor (CPU), such as the type of CPU, manufacturer, model, and performance. 3. /proc/devices: A list of device drivers for the currently running core configuration. 4. /proc/DMA: Displays the D M a channel currently in use. 5. /proc/filesystems: 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: i/currently in useo port. 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: Message for core output. will also be sent to the syslog. Ten. /proc/ksyms: The core symbol table.  One. /proc/loadavg: System "average load"; 3 meaningless indicators indicate the current workload of the system.  A. /proc/meminfo: Various memory usage information, including physical memory and swap partition (swap).  -. /proc/Modules: Stores which core module information is currently loaded.  -. /proc/Net: Network protocol status information.  the. /proc/self: A symbolic connection to the process directory that is stored to view the/PROC program. When 2 processes view/proc, this will be a different connection. This is primarily convenient for the program to get its own process directory.  -. /proc/stat: The different states of the 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.

The role of each folder under the CentOS 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.