2

Why is there /etc and ~/.config? Why is the global config called "etc" yet the user's config stuff is called ".config"?

  • 1
    One was created 40 years ago, the other much more recently. They were created by different people who had different ideas about naming. Some applications use neither location. – user535733 Oct 19 '20 at 21:09
  • 1
    The etc stands for editable text configuration. – user68186 Oct 19 '20 at 21:12

2 Answers2

1

Just review definition of each files:

  1. 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. $HOME/.config is where per-user configuration files go if there is no $XDG_CONFIG_HOME

Based on This answer: "The idea is that per-user files can be (amongst quite a lot of other things) application data files (machine-specific or roaming), application configuration files, cached files, and temporary files, and applications place them in subtrees rooted at these particular directories."

More Reading:

  1. Host-specific system configuration
  2. configuration ethics (esthetics): /etc vs $HOME
  3. Understanding home configuration file locations: ~/, ~/.config/ and ~/.local/share/
MoYa
  • 124
0

.config is a convention defined in https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html which is used for to keep user spesific config files (new way), before that general usage is every app kepps their config files in their ~.APP_NAME folder (old way)

/etc is a unix spesification which used to keep system-wide config files. https://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/etc.html

obayhan
  • 275
  • 1
  • 10