36

I've assumed /etc/default was a handy place to save the post-install/default state of configuration files so that when some poor sysadmin arrives at a new system she can quickly determine what has been customised on that instance.

But having just had a look around in there it seems I am mistaken? So apologies if this is a dumb question...

  1. What's supposed to be in the /etc/default directory?
  2. Where would it be appropriate, or is there a convention, for saving the default state of config files?
44

From a post on a Slackware forum:

Basically, /etc/default contains some parameters that the end user or administrator is likely to change, rather than embedding the values in the actual boot scripts. In this way, changes will persist even if you upgrade the package and the boot script is replaced.

In Debian, /etc/default/ is a directory of mostly empty files. The way it is meant to work is that each /etc/init.d/test script first sources /etc/default/test before starting/stopping the test service. The purpose of the file is to provide extra options for starting the service, or override certain aspects of the service's startup.

  • 2
    Voting you down for quoting without giving proper attribution: linuxquestions.org/questions/slackware-14/… "Basically, /etc/default contains some parameters that the end user or administrator is likely to change, rather than embedding the values in the actual boot scripts. In this way, changes will persist even if you upgrade the package and the boot script is replaced." – Subfuzion Apr 3 '17 at 16:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.