Glossary

/etc

/etc holds host-specific, system-wide configuration files. The name originally meant "et cetera"—a place for miscellaneous files that did not fit elsewhere—but the FHS now defines it precisely: /etc is for configuration, period. No binaries, no data, no documentation; just text files (and a few trees of them) that determine how the system and its services behave.

Canonical examples include /etc/passwd and /etc/shadow (user accounts), /etc/hostname, /etc/hosts, /etc/resolv.conf (networking), /etc/fstab (filesystem mounts), /etc/ssh/sshd_config (SSH daemon), /etc/apt/sources.list (Debian package sources), /etc/systemd/system/ (custom systemd units), and /etc/sudoers. Subdirectories like /etc/cron.d/, /etc/logrotate.d/, and /etc/udev/rules.d/ let packages drop in drop-in fragments without touching a single shared file.

Because /etc contains the entire state of system configuration, it is the first thing to back up, the first thing to version-control with tools like etckeeper, and the first thing to diff when diagnosing why two otherwise identical machines behave differently. Packages install defaults there and mark them as "conffiles" so updates do not clobber local changes. On a well-kept Linux system, you can often reproduce its entire behaviour by copying /etc and the installed package list.

Related terms: Filesystem Hierarchy Standard, /etc/passwd, fstab

Discussed in:

Also defined in: Textbook of Linux