4 ms·
Maybe a dumb question but why do so many apps rely on dotfiles when /etc exists? I'm not making a judgement, this is an earnest question as even though it's mea
by csydas 4y ago
Maybe a dumb question but why do so many apps rely on dotfiles when /etc exists? I'm not making a judgement, this is an earnest question as even though it's meant for system config files, is there any reason that all app configurations shouldn't live there?
If not in /etc, then at least /usr/etc? I'm sure there is some historical reason but some brief searching and I've not really come up with why dotfiles everywhere are preferable to a centralized configuration directory.
- dooglius 4y agoMulti-user systems, where things outside $HOME are not editable, and where different users may have different configurations.
- ews 4y agoI assume that because on true multi-user systems, syncing permissions between $HOME and /usr/etc/$USER may be a complete disaster.
- nmz 4y agoBack ups would require you to know which paths are actually yours and where, chrooting would be problematic.
- CleverLikeAnOx 4y agoDotfiles are a per user application config. Other users of the same system are unlikely to want my idiosyncratic zsh setup. Hence the suggestion for $HOME/cfg in the article.
- PeterWhittaker 4y agoApps can rely on both /etc (for system defaults) and on ~/.something (for per user defaults). If we used only /etc, then we would need per user entries there, which would be far more difficult, esp. with network-mounted home folders, especially when those are automounted.
- nmz 4y agoIt would be simple with union mounts.
- PeterWhittaker 4y agoIt would be simple now. It took quite a while to get them right. My first thought was namespaces, but they are even more recent. The ~/.* convention worked a long time ago, far before either union mounts or namespaces were reliable.
- nmz 4y agoNot that recent considering that's how plan9 works and plan9 is from the 90's. 1992[0] to be exact (apparently). [0]: https://plan9.io/sys/doc/names.html https://plan9.io/sys/doc/names.html
- PeterWhittaker 4y agoEven given Plan9, which I was aware of (hey, rc was my shell for a while in the early 90s), how many tries did it take to get right in Linux, even with that knowledge and experience? At least two, arguably three, and, arguably, unless namespaces, we didn’t really get there. (On a somewhat related note, I was very excited that when HP bought Apollo they might integrate the // resource naming into HP-UX. That would have been nice. I say related, because there is a great deal of cool from other systems that died with those systems.)