Vol. I · No. 46The command line sectionSat, 10 Oct 2026
Configuration and changing data

/etc

system-wide configuration

/etc is where the system’s settings live. Users, host names, DNS servers, services — each is a plain text file you can read and edit. There is no registry and no hidden database: to change how a machine behaves, you change a file here.

To know how a machine is set up, read /etc.

Holds
Configuration
Text files, one or more per program
On disk
Yes
Small, and worth backing up
Who writes
root
Most files are readable by everyone
Name
Et cetera
Said “et-see”

Why it exists

Every directory at the top of the tree is there for a reason. This is the problem /etc solves.

Settings separated from programs

Because configuration is not mixed in with the software, a program can be upgraded or reinstalled without losing how it was set up.

Text can be managed like text

A plain file can be searched with grep, compared with diff, copied to another machine and kept in version control. That is what makes Linux servers easy to automate.

It makes each machine itself

Two servers with the same packages differ only in /etc and their data. Back up /etc, and you have the machine’s identity.

What you find inside

Not everything, but the entries worth recognising. Each is marked as a directory, a file, a link or a device.

/etc
  • passwdfileThe list of user accounts. Despite the name, no passwords.
  • shadowfileThe password hashes. Readable only by root.
  • hostsfileNames mapped to addresses, checked before the DNS.
  • resolv.conffileWhich DNS servers the host asks.
  • fstabfileWhich filesystems are mounted at boot, and where.
  • sshdirectoryThe SSH server’s and client’s settings, and the host keys.
  • systemddirectoryService definitions added or overridden by the administrator.

At the terminal

Four commands that show what this directory is doing on a real machine.

cat /etc/os-release

Show which distribution and version this machine runs.

cat /etc/hosts

Show the names this host resolves without asking the DNS.

grep -r "Port" /etc/ssh/

Search every file in a configuration directory for a setting.

sudo cp /etc/fstab /etc/fstab.bak

Keep a copy of a file before editing it.

Handle with care

What goes wrong here, and what someone securing or attacking the machine looks at.

Copy before you edit

A typing mistake in fstab or sudoers can leave a machine unable to boot or you unable to become root. Keep a copy, and use visudo for the sudoers file.

This is what an attacker reads first

passwd lists the accounts, shadow holds the hashes, and configuration files often contain passwords. Check that secrets are readable only by those who need them.

Changes need a reload

Editing a service’s file does not change the running service. Reload or restart it with systemctl for the new setting to take effect.

Read alongside