Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm serious - is it really fun for *nix sysadmins spending half of their life on spotting typo in httpd.conf ? Why not use xml or json - (write gui tools would be easier)

share|improve this question

closed as not constructive by Zoredache, Zypher, John Gardeniers, Dennis Williamson, splattne Mar 17 '10 at 14:07

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 10 down vote accepted

This quite a utopian request. More or less similar to asking why is there more than a single:

  • programming language
  • operating system
  • right side of the road to drive a car
  • measurement system
  • alphabet

Open Source (and close source for that matter) developers are simply free to choose the format that best suit their needs. It is unlikely to change at least in the Unix/Linux world although trends do happen.

By the way, xml used to be quite popular but at the same time was bothering others for its lack of readability and tolerance. A consensus might appear in the future on some format, and json is indeed not bad and has a bunch of different languages implementations.

share|improve this answer
it's no a utopia - if all .net apps could have one app.config which is good enough then why linux conf file couldn't be standardized ? OMG - people ! configuring application is not a magic ! – tomaszkubacki Mar 17 '10 at 10:28
Now you are getting at a specific framework. Its not OS specific. This is true for almost any framework and not even close to be a good comparison for your original question. – artifex Mar 17 '10 at 10:35
@artifex - so what ? Is there anything in linux config files which can't be expressed as valid json ? – tomaszkubacki Mar 17 '10 at 11:09
Probably not, although "linux config files" is vague but I'm afraid you are missing the point. Is there any measurement that can't be expressed using the metric system ? No. Why do airplane pilots still use feet and miles all over the world ? because it's their choice. All definitive standardization is an utopia. Standards evolve. There is freedom of choice. Of course if you narrow the scope to a single operating system and a single framework, it is something more reachable, but still untrue. As far as I know, nothing forbids a .net developer to use its custom configuration file format. – jlliagre Mar 17 '10 at 11:27
Claiming I'm wrong while I simply describing the real world isn't going to help you in your quest. If you want to promote a syntax, do it. Find a name, create a site, a community around it, evangelize developers. I'm afraid you'll have a hard time though and find people like myself who do not care that much about configuration file syntax variants. To clarify, imposing a syntax would stop innovation and the perfect solution is missing. There might never be a "one size fit all" syntax like you seem to expect. Unix and Gnu/Linux developers are usually quite serious about their freedom of choice. – jlliagre Mar 17 '10 at 18:03

Linux is just a kernel. GNU Software bundled in distributions is another story. The team working on distributions take care about quality of software and packaging, but most of the time they aren't involved in the development of the particular piece of software.

As mentioned above, a lot of stuff is many years old, and lots of notation comes out from history.

Personally I disagree, that any kind of GUI would be easier than text-file configuration. Using XML would make things a lot harder in many places. Standard config files are way easier to parse from command line using tools like awk/sed and so forth.

Aside from that, what "typo spotting" are you refering too? Most of the software has mechanisms which will show you where exactly is the problem.

share|improve this answer
1.Selecting something from combobox IS easier than writing it in config file. 2. you know that "something is wrong" after you write config file and try to rerun service Don't you really see the difference ? – tomaszkubacki Mar 17 '10 at 9:52
There is no reason to clog-up a clean server install with just apache with loads of GUI tools. It may be easier, but at some point you will begin to thumb on the flexability of the program to provide a useable GUI. – artifex Mar 17 '10 at 10:40
@j23tom: Selecting something from combobox IS NOT easier than writing it in config file when generating that file via script. – jscott Mar 17 '10 at 10:53
@jscott that's very good point, but then why not use xml or json ? – tomaszkubacki Mar 17 '10 at 11:20
@j23tom: Please don't think that there is a "standard" XML or JSON format for any files either. Have a look at the iTune prefs XML config file -- it contains more binary data than text. :( – jscott Mar 17 '10 at 13:06

A lot of it is historical. You find the same on the MS world... ...old stuff uses either arcane syntax that is made up, or INI files, new stuff from the .NET era is XML based.

In the unix world, you really have to look at the age of some of the software. Yes, it did go through revisions, but with no config standards anywhere.... noone ever made one up that got weight. Without that... well... nothing ever gets enough momentum to trigger other people to rewrite.

The negative side of no central instance trying to push for a standard.

Which sucks. Comparing the sometimes tremendous complex web.conig in with some easier unix configurations, I am STILL better off with the XML. As you said - easier to write tools, easier to check etc. After all, XML has a lot of tooling support.

share|improve this answer

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