What do you mean by the/etc and/var directories in Linux? What are the characteristics of the files in these two directories?

Source: Internet
Author: User

Http://zhidao.baidu.com/link?url=DkxU9CyhJb_dIUAPCmPmxRtQsENgCzqy5qnLPEj_V9DqNzdt6Qya0U5iCVRCYFkgoRomoqUS_ZO7aIikccOTta

/ 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. In the original/var directory, some of the content is in/usr, but in order to maintain the relative stability of the/USR directory, the directories that need to change frequently are placed in/var. 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 (man) page. The source file for the help page is generally present in/usr/man/catman, 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 in/var/man so that other people can look at the same page without waiting for formatting. (/var/catman are often cleared, just as you would clear a temporary directory.) )
2./var/lib: The file to be changed when the system is in normal operation.
3./var/local: Variable data that holds the programs installed in the/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.
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 will not use this device or file when they notice the lock file.
5./var/log: Logs (log) files for various programs, especially login (/var/log/wtmplog records all log-in and logoff to system) and Syslog (/var/log/messages Records store all core and System program information). The files in the/var/log often grow in uncertainty and should be cleaned up regularly.
6./var/run: A system-related information file is available before the next system boot. For example,/var/run/utmp contains information about the user who is currently logged on.
7./var/spool: directory where the "spool (spool)" program is placed, such as mail, news, print queues, and other queued work. Each of the different spool has its own subdirectory under/var/spool, for example, the user's mailbox is stored in/var/spool/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 to have very old files.

/ 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 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 includes information about the swap 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: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: Config 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.
/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).
/etc/shadow: Shadow password file on a system with Shadow (shadow) password software installed. The shadow password file moves the encrypted password in the/etc/passwd file to/etc/shadow, which is readable only by the superuser (root). This makes it more difficult to decipher the password, which increases the security of the system.
configuration file for the./etc/login.defs:login command.
/etc/printcap: Similar to/etc/termcap, but for printers. syntax is different.
/etc/profile,/etc/csh.login,/ETC/CSH.CSHRC: Files that are executed Bourne or cshells at logon or startup. This allows the system administrator to establish a global default environment for all users.
/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. Provide a
The service process of the Machine FTP service FTPD checks whether the user shell is listed in the/etc/shells file, and if 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. No direct output escaping when writing programs
Sequence (this works only with a particular brand of terminal), but instead looks for the correct sequence of work to be done from/etc/termcap. In this way, most programs can run on most terminals.

What do you mean by the/etc and/var directories in Linux? What are the characteristics of the files in these two directories?

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.