Configuration file

from Wikipedia, the free encyclopedia

A configuration file is a file on a computer in which certain settings (the configuration ) of computer programs or hardware components are stored.

The use of simple text files in the coding common to the respective operating system, such as ASCII or UTF-8 , is widespread , so that they can be processed with a wide variety of programs, e.g. B. any text editor or on the command line .

Configuration files can a. also be binary , compressed or encrypted . There are also programs that manage their configuration files completely themselves. In such cases, the user does not have to or cannot deal directly with the corresponding configuration file.

File formats

In principle, no special file format is specified - each program or the developers of a computer program determine how settings are saved. A very simple way of saving configuration options is to write them as variables in binary form as data in a file with a given name (and an absolute or relative path). However, this data is difficult to interpret outside of the program. So therefore a configuration file can be read outside of the program and changed, many programs use text files as configuration files that follow a specific syntax, with the disadvantage that the program this data interpret when reading ( English parse ) needs to make it binary into their Traced back to shape.

There are some standardized file formats that are popular for configuration files. This is not least due to the fact that there are numerous ready-made program libraries for reading in and parsing such file formats. The most common file formats include:

  • INI (initialization file)
  • YAML (YAML Ain't Markup Language)
  • TOML (Tom's Obvious, Minimal Language)
  • XML (Extensible Markup Language)
  • JSON (JavaScript Object Notation)

Distribution depending on the operating system

In principle, the file format used does not depend on the operating system , but applications often use the same formats as the operating system they are running on.


The initialization files ( ) were often used under Windows . The registration database ( English Registry ) of a Windows system is a configuration file. However, this file is in a binary format, which is why special applications and services are required to be able to open and edit it. *.ini user.dat

Unix-like operating systems

Unix-like operating systems such as Linux or macOS use many different formats, although it is important to ensure that these are text files such as ASCII. Binary formats are rather uncommon. Although files on Linux systems often have no file extension, configuration files sometimes have shortcut / file extensions such as *.cnf, *.confor *.cfg. Apple often formats settings in macOS as a so-called property list with the file identifier *.plist.

In Unix-like systems, applications usually independently store their own configuration files in the user directory (usually ) with a leading dot in the file name. The point means that the files are viewed as hidden and are not displayed by default when the directory content is output. but writes another location before you: or if this environment variable is not set: . /home/benutzername/$XDG_CONFIG_HOME~/.config/

When an application is installed or by a system administrator, configuration files that apply to all users can also be /etccreated in the directory . In macOS, the user-specific configuration files of applications are usually stored in. macOS saves settings that apply to all users, in addition to the directory in . /Users/benutzername/library/Preferences/etc/Library/Preferences

Individual evidence

  1. a b c Comparing the Mac OS X Property List to the Windows Registry ,, accessed July 30, 2011
  2. ^ XDG Base Directory Specification. Environment variables. In: . November 24, 2010, accessed August 3, 2020 .