21
submitted 2 weeks ago* (last edited 2 weeks ago) by SubArcticTundra@lemmy.ml to c/linux4noobs@programming.dev

One point of user-hostility you face when configuring Linux is all the config files in /etc. Be it crontab, fstab, or iptables, every project has its own ad-hoc config file format and as a rookie user you're left guessing what the rules for editing each one are. Must you separate entries with tabs or can it be spaces? Does the number of tabs matter? Does this file use # to comment or ;? Can you put a space after = or would that become part of the string? Some projects use their own half-baked implementation of .INI that breaks down the moment you try to escape a string. What's worse is that since it's background processes whose files you are editing, the response to a syntax error is nothing happening. The way to test whether you guessed the rules right is to wait and see 🤷

What I'm trying to say is that IMHO, the Linux Kernel and surrounding utilities should agree on a widespread, standardized config format and all migrate to it (prefarably sharing the same C library). The obvious option would be JSON, although it feels a little clunky and doesn't officially support comments. My preference would be TOML, since it's like INI which many projects kinda use already, but it's standardized and has native support for things like arrays (especially useful for fstab/crontab).

top 12 comments
sorted by: hot top controversial new old
[-] lime@feddit.nu 22 points 2 weeks ago

linux already has a standard, which it inherited from unix: plain text.

structured text is good but there is always some edgecase that needs to be worked around. plain text is universal.

there are alno verification functionality in basically every core utility.

[-] tal@lemmy.today 5 points 2 weeks ago* (last edited 2 weeks ago)

In abstract, I guess maybe there would be some benefit, but I've been using Linux for decades, and it really hasn't been an issue for me. I've definitely had times where configuring stuff is confusing, but it's not a function of the basic input format not being JSON or XML or TOML or YAML or whatever. I think that the only time that I recall tabs being obnoxious was not with config files, but with Makefiles (they do, in fact, require tabs).

The majority of software is packaged with an "example" config file, often with comments in place. Traditionally, software will also ship with a section 5 man page for its config files. So, for example:

$ man 5 fstab

Will describe the format for /etc/fstab.

EDIT: I think that the biggest hassle I recall was in configuring a sendmail mail server, quite some years back. The issue there wasn't the basic format, but the fact that due to organic growth, even basic configurations were enormous (just to get the sort of common configuration that most users wanted) and required quite a bit of reading through the option documentation. It was common to use a frontend to generate the config files, and a number of subsequent mail servers aimed at having their default, no-configuration-options state being closer to what people wanted, dramatically reducing the number of options that had to be specified.

[-] SubArcticTundra@lemmy.ml 5 points 2 weeks ago* (last edited 2 weeks ago)

Of course a challenge in the Linux ecosystem would be coordinating this change to happen widely and at once (which is important from a UX perspective). Since each of the aforementioned files belongs to a different project, and each project has its own maintainers that would need persuading (or rather inviting to the table to agree on a single format).

[-] lime@feddit.nu 6 points 2 weeks ago

also ensuring backwards compatibility with everything released in the last 50 years that's still in use.

[-] brian@programming.dev 1 points 1 week ago

it'd make more sense to have a translation layer on top that generates configs for everything from a consistent language. you're never going to get buyin from enough projects to do it directly.

my system is entirely generated from nix files, 0 handwritten config files. it's json like if you squint, supports comments, but has functions and can be extended to whatever files you need to generate.

I do think there's alternatives in the area, but I don't think any of them are as complete

[-] sloelk@piefed.social 3 points 2 weeks ago

I see and feel what OP does. As a newbee to Linux (I guess, a lot in EU want to switch to Linux nowadays) it is really hard to learn which config file will how be used for which tool. As with the nature of Linux, that it has grown organically since years, plain text has been around since decades.

Are there any tools around to create config files easier? It is like programming without much knowledge and I guess a lot of "normal" users stick with Windows or Mac because of this.

[-] SubArcticTundra@lemmy.ml 2 points 1 week ago* (last edited 1 week ago)

As a newbee to Linux (I guess, a lot in EU want to switch to Linux nowadays) it is really hard to learn which config file will how be used for which tool.

Yep

Are there any tools around to create config files easier?

Hmm, I don't know what you mean by 'tools for creating config files'... If you don't want to have to type the syntax of config files manually then there are programs like DConf Editor, which in an ideal world all the system settings would fall under. But the files that I'm talking about are specifically those that haven't been moved to use DConf for whatever reason.

[-] sloelk@piefed.social 1 points 1 week ago

ok, I look into DConf. maybe this helps.

But I get it, that the most projects because of no or not much income, can’t jump onto this to improve their tools. Whereas I think usability is a big big feature for most people. Mostly better a low feature set easy to use instead of a big feature set which are not much people can use.

[-] klankin@piefed.ca 2 points 2 weeks ago

Try nix, its esentially JSON with functions

[-] rozodru@piefed.social 1 points 2 weeks ago

I recently tried out Ironbar because waybar just really annoys me and I was impressed with Ironbars config which was essentially "yeah...use whatever the hell you want."

[-] PointyFluff@lemmy.ml -2 points 2 weeks ago

Spoken like a true ignorant noob. JSON is hot fucking garbage. TOML is ok. Plaintext is GOAT.

[-] alsimoneau@lemmy.ca 1 points 2 weeks ago

By plaintext, do you mean a single value per file?

this post was submitted on 29 Jan 2026
21 points (83.9% liked)

linux4noobs

3208 readers
53 users here now

linux4noobs


Noob Friendly, Expert Enabling

Whether you're a seasoned pro or the noobiest of noobs, you've found the right place for Linux support and information. With a dedication to supporting free and open source software, this community aims to ensure Linux fits your needs and works for you. From troubleshooting to tutorials, practical tips, news and more, all aspects of Linux are warmly welcomed. Join a community of like-minded enthusiasts and professionals driving Linux's ongoing evolution.


Seeking Support?

Community Rules

founded 2 years ago
MODERATORS