Linux Configuration Files

Source: Internet
Author: User

Configuration files for Linux systems, in multi-user, multi-tasking environments, profiles control user rights, system applications, daemons, services, and other administrative tasks. These tasks include managing user accounts, assigning disk quotas, managing e-mail and newsgroups, and configuring kernel parameters. The following is a classification of the configuration files, described in Red Hat as an example, the file names and paths of different systems may differ.

Unless otherwise established, most of the configuration files in the Red Hat Linux system are in the/etc directory, and they can be broadly divided into the following categories.

accessing files

/etc/host.conf
Tell the network name server how to find the host name. (usually/etc/hosts, then a name server, which can be changed by netconf)

/etc/hosts
Contains a list of known hosts (on the local network). If the system's IP is not dynamically generated, it can be used. For simple host name resolution (dot notation), before requesting a DNS or NIS Network name server,/etc/hosts.conf usually tells the resolver to check here first. Boot and Login/logoff

Etc/issue &/etc/issue.net
These files are read by Mingetty (and similar programs) to display a "welcome" string to a user who is connected from a terminal (issue) or through a Telnet session (Issue.net). They include several lines of information stating the Red Hat version number, name, and kernel ID. They are used by rc.local.

/etc/redhat-release
Includes a line of information that declares the Red Hat version number and name. Used by rc.local.

/etc/rc.d/rc
Typically run at all run levels, and levels are passed as parameters. For example, to boot a machine in graphical (graphics) mode (x-server), run the following command at the command line: init 5 . Run Level 5 indicates that the system is booted in graphical mode.

/etc/rc.d/rc.local
Informal. Can be called from RC, Rc.sysinit, or/etc/inittab.

/etc/rc.d/rc.sysinit
is usually the first script of all runlevel.

/etc/rc.d/rc/rcx.d
A script that runs from RC (X represents any number between 1 and 5). These directories are specific "runlevel" directories. When the system starts, it recognizes the runlevel to start, and then calls all startup scripts that exist in the specific directory for that RunLevel. For example, a "entering Run-level 3" message is typically displayed after the boot message when the system starts, which means that all initialization scripts in the/etc/rc.d/rc3.d/directory are called. System Management

/etc/group
Contains a valid group name and the users that are included in the specified group. A single user can exist in multiple groups if they perform multiple tasks. For example, if a user is a member of the Project 1 project group and is also an administrator, his entry looks like this in the group file: user: * : group-id : project1

/etc/nologin
If a/etc/nologin file exists, login (1) will only allow access by the root user. It will display the contents of this file to other users and refuse to sign in.

etc/passwd
Please refer to "Man passwd". It contains some user account information, including the password (if it has not been encrypted by the shadow program).

/etc/rpmrc
RPM command configuration. All RPM command-line options can be set together in this file, so that when any RPM command runs on the system, all options are applied globally.

/etc/securetty
Contains the device name, consisting of a TTY line (one name per line, excluding the previous/dev/), where the root user is allowed to log in.

/etc/usertty
/etc/shadow

Contains encrypted user account password information, and can also include password aging information. The fields included are:

    • Login Name
    • Password after encryption
    • From January 1, 1970 to the number of days the password was last changed
    • The number of days before the password can be changed
    • Number of days before password must be changed
    • Number of days the user was warned before the password expires
    • Number of days the password expires payback disabled
    • Number of days from January 1, 1970 to account disabled

/etc/shells
Contains a list of possible "shells" that are available to the system.

/etc/motd
Daily messages, used when an administrator wants to communicate a message to all users of a Linux server.

Network-related

/etc/gated.conf
The configuration of the gated. Can only be used by the gated daemon.

/etc/gated.version
Contains the version number of the gated daemon.

/etc/gateway
Used by the routed daemon, optionally.

/etc/networks
Lists the network names and network addresses that can be accessed from the network to which the machine is connected. Used by routing commands. Allows the use of network names.

/etc/protocols
Lists the currently available protocols. Please refer to the NAG (network Administrator's Guide) and the online help page for Administrators. The C interface is getprotoent. can never be changed.

/etc/resolv.conf
Tells the kernel which name server should be queried when the program requests "resolve" an IP address.

/etc/rpc
Contains RPC directives/rules that can be used in NFS calls, remote file system installations, and so on.

/etc/exports
The file system (NFS) to export and the permissions to it.

/etc/services
Converts the network service name to a port number/protocol. Read by inetd, Telnet, tcpdump, and some other programs. There are some C access routines.

/etc/inetd.conf
The inetd configuration file. See the inetd online help page. Contains entries for each network service, inetd must control daemons or other services for these network services. Note that the services will run, but they will be commented out in/etc/services, so that they will not be available even if the services are running. The format is:

/etc/sendmail.cf
The SendMail configuration file for the mail program. Rather obscure, it is difficult to understand.

/etc/sysconfig/network
Indicate Networking=yes or No. Read at least by Rc.sysinit.

/etc/sysconfig/network-scripts/if*
Red Hat Network configuration script.

Change the configuration file

If the program is not controlled by the system administrator or the kernel when the configuration file is changed, make sure that the program that uses the configuration is restarted. Normal users typically do not have permission to start or stop system programs and/or daemons.

Daemons and System programs

The daemon is a program that runs in the background forever, and it silently executes its own task. Common daemons are IN.FTPD (FTP server daemon), in.telnetd (Telnet Server daemon), and syslogd (System logging daemon). Some daemons monitor the configuration file closely at run time and reload it automatically when the configuration file changes. However, most daemons do not automatically reload the configuration file. We need to "tell" in some way that these daemon profiles have been changed and should be reloaded. You can do this by restarting the service using the Service command (on the Red Hat Linux system).

For example, if we change the network configuration, we need to issue:
service network restart

Note: The most common of these services is the script that exists in the/etc/rc.d/init.d/* directory, which is initiated by Init when the system is booted. Therefore, you can also restart the service by doing the following:
/etc/rc.d/init.d/

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.