Lably
Skip to content

Configuration file

File holding settings for a computer program

  • 4 min read
  • 2 chapters

Related on Lably

Through Application software, Server (computing) and Operating system

Some applications provide a tool to create, modify, and verify the syntax of their configuration files – sometimes via graphical user interface (GUI). For context, system administrators may be expected to create and modify text config files via a text editor. For server processes and operating-system settings, there is often no standard tool, but operating systems may provide graphical interfaces such as YaST or debconf.

Some computer programs only read their configuration files at startup. Others periodically check the configuration files for changes. Users can instruct some programs to re-read the configuration files and apply the changes to the current process, or indeed to read arbitrary files as a configuration file. There are no definitive standards or strong conventions.

File format

In general, a config file can have any format. The format that applies to a particular system is determined by the design of that system. Often, a standardized format is used since it allows for using tools designed for the format even if not designed for the consuming system. In particular, general-purpose serialization formats, such as JSON, XML, and YAML, are often used in open-source and platform-neutral software. The specifications for these formats are generally publicly available to support wide-spread use.

The following table compares notable formats used for configuration data.

The syntax typing column indicates whether the syntax supports data types. A format has syntax-typing if a value's type is specified by syntax – e.g. true is a Boolean while "true" is a string. A format does not have syntax-typing if a value's type is based on semantics – e.g. true and "true" are both Boolean if the parser expects a Boolean. Opinions on the value of syntax-typing vary.

Sign in to keep reading

One more chapter is free with a Lably account.

More in Computing and communication