3.7. /etc : Host-specific system configuration

3.7.1. Purpose

The /etc hierarchy contains configuration files. A "configuration file" is a local file used to control the operation of a program; it must be static and cannot be an executable binary. [2]

It is recommended that files be stored in subdirectories of /etc rather than directly in /etc.

3.7.2. Requirements

No binaries may be located under /etc.

The following directories, or symbolic links to directories are required in /etc:

DirectoryDescription
optConfiguration for /opt

3.7.3. Specific Options

The following directories, or symbolic links to directories must be in /etc, if the corresponding subsystem is installed:

DirectoryDescription
X11Configuration for the X Window system (optional)
sgmlConfiguration for SGML (optional)
xmlConfiguration for XML (optional)

The following files, or symbolic links to files, must be in /etc if the corresponding subsystem is installed: [3]

FileDescription
csh.loginSystemwide initialization file for C shell logins (optional)
exportsNFS filesystem access control list (optional)
fstabStatic information about filesystems (optional)
ftpusersFTP daemon user access control list (optional)
gatewaysFile which lists gateways for routed (optional)
gettydefsSpeed and terminal settings used by getty (optional)
groupUser group file (optional)
host.confResolver configuration file (optional)
hostsStatic information about host names (optional)
hosts.allowHost access file for TCP wrappers (optional)
hosts.denyHost access file for TCP wrappers (optional)
hosts.equivList of trusted hosts for rlogin, rsh, rcp (optional)
hosts.lpdList of trusted hosts for lpd (optional)
inetd.confConfiguration file for inetd (optional)
inittabConfiguration file for init (optional)
issuePre-login message and identification file (optional)
ld.so.confList of extra directories to search for shared libraries (optional)
motdPost-login message of the day file (optional)
mtabDynamic information about filesystems (optional)
mtools.confConfiguration file for mtools (optional)
networksStatic information about network names (optional)
passwdThe password file (optional)
printcapThe lpd printer capability database (optional)
profileSystemwide initialization file for sh shell logins (optional)
protocolsIP protocol listing (optional)
resolv.confResolver configuration file (optional)
rpcRPC protocol listing (optional)
securettyTTY access control for root login (optional)
servicesPort names for network services (optional)
shellsPathnames of valid login shells (optional)
syslog.confConfiguration file for syslogd (optional)

mtab does not fit the static nature of /etc: it is excepted for historical reasons. [4]

3.7.4. /etc/opt : Configuration files for /opt

3.7.4.1. Purpose

Host-specific configuration files for add-on application software packages must be installed within the directory /etc/opt/<subdir>, where <subdir> is the name of the subtree in /opt where the static data from that package is stored.

3.7.4.2. Requirements

No structure is imposed on the internal arrangement of /etc/opt/<subdir>.

If a configuration file must reside in a different location in order for the package or system to function properly, it may be placed in a location other than /etc/opt/<subdir>.

Rationale

Refer to the rationale for /opt.

3.7.5. /etc/X11 : Configuration for the X Window System (optional)

3.7.5.1. Purpose

/etc/X11 is the location for all X11 host-specific configuration. This directory is necessary to allow local control if /usr is mounted read only.

3.7.5.2. Specific Options

The following files, or symbolic links to files, must be in /etc/X11 if the corresponding subsystem is installed:

FileDescription
xorg.confThe configuration file for X.org versions 7 and later (optional)
XmodmapGlobal X11 keyboard modification file (optional)

Subdirectories of /etc/X11 may include those for xdm and for any other programs (some window managers, for example) that need them. [5]

3.7.6. /etc/sgml : Configuration files for SGML (optional)

3.7.6.1. Purpose

Generic configuration files defining high-level parameters of the SGML systems are installed here. Files with names *.conf indicate generic configuration files. File with names *.cat are the DTD-specific centralized catalogs, containing references to all other catalogs needed to use the given DTD. The super catalog file catalog references all the centralized catalogs.

3.7.7. /etc/xml : Configuration files for XML (optional)

3.7.7.1. Purpose

Generic configuration files defining high-level parameters of the XML systems are installed here. Files with names *.conf indicate generic configuration files. The super catalog file catalog references all the centralized catalogs.



[2] To be clear, /etc may contain executable scripts, such as the command scripts commonly called by init to start and shut down the system and start daemon processes. "Executable binary" in this context refers to direct machine code or pseudocode not in a human-readable format, such as native ELF executables.

[3] Systems that use the shadow password suite will have additional configuration files in /etc (/etc/shadow and others) and programs in /usr/sbin (useradd, usermod, and others).

[4] On some Linux systems, this may be a symbolic link to /proc/mounts, in which case this exception is not required.

[5] /etc/X11/xdm holds the configuration files for xdm. These are most of the files previously found in /usr/lib/X11/xdm. Some local variable data for xdm is stored in /var/lib/xdm.