Expected Config File Locations

Paul londonpm90123 at rainslide.net
Fri Sep 2 19:35:04 BST 2011

On Tue, Aug 30, 2011 at 01:55:48PM +0100, Smylers wrote:
>Hi. I'm looking for some advice on where I should put the config file
>for a command I'm distributing on Cpan. Where would you it to be? I'm
>interested in opinions of Windows, Mac, and Unix users, for both
>per-user and system-wide config.

Some standards already exist that might help your decision.

Particularly for user configuration files:

The FHS says it should be ~/.bang[/]: http://refspecs.linuxfoundation.org/FHS_2.3/fhs-2.3.html#REQUIREMENTS4A

However, the Freedesktop spec. says ~/.config/bang[/]: http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html#variables

For system-wide configuration files, I'd want to see anything that isn't part of my distribution in /usr/local, ie. /usr/local/etc/bang[/], but I'd expect it to be put into /etc, just because a lot of software does that.

Personally, I prefer ~/.config/bang[/] and /usr/local/etc/bang[/].

This is of course unless the user doesn't specify their own place at some point.

>  But I'd be surprised to find /usr/local/etc/ being used on Linux.

On Linux, I already have user-installed packages that use this by default, and a load of things that use ~/.config/.



More information about the london.pm mailing list