What is configuration file? | Definition from TechTarget (2024)

What is configuration file? | Definition from TechTarget (1)

By

  • Stephen J. Bigelow,Senior Technology Editor

What is a configuration file?

A configuration file, often shortened to config file, defines the parameters, options, settings and preferences applied to operating systems (OSes), infrastructure devices and applications in an IT context.

Software and hardware devices can be profoundly complex, supporting myriad options and parameters. In configuration files, IT administrators explicitly delineate appropriate settings and choices for their specific data center, cloud or user environment.

For example, a configuration file could specify where to store log files from an application via the storage path, which plugins are allowed in a given program, and color scheme and dashboard widget preferences for a user interface (UI).

How do configuration files work?

At start time, the application or other system opens, reads and parses the configuration file and applies each setting. Configuration options can be changed while the application runs, taking effect either immediately or upon restart when the configuration file is reread.

IT environments can use either a single configuration file or multiple configuration files for different system components. For example, a complex application might use separate configuration files for UI settings, network and storage parameters, and other aspects that must be set up for operation. However, using multiple configuration files can introduce management difficulties.

Configuration file formats and syntax

Plaintext configuration files used in Linux environments have extensions such as .cnf, .conf, .cfg, .cf and .ini. Early command-line OSes such as MS-DOS relied on a single plaintext configuration file with a .sys extension. Common modern configuration filename extensions depend on the prevailing file format or use .config.

Some configuration files are meant to be human readable, using plaintext formats compatible with any common text editor. The scripting language PHP uses a plaintext file called php.ini, and Microsoft Windows uses the desktop.ini file to configure how a folder is displayed.

Configuration files have largely adopted serialization formats such as XML, YAML and JSON to represent complex data structures in a way that is easily stored and parsed. The resulting filenames reflect this format -- for example, myapplication_configuration.yaml. With this setup, administrators can identify a modern configuration file by its name rather than its extension.

Types of content in configuration files

Configuration file content is often specific to the corresponding application or system but generally falls into one of four principal content types: comments, flags, settings and paths.

Comments

Comments are essential to configuration files but do not affect how the file behaves. Developers use comments to communicate intended behaviors and document important actions.

For example, the .ini file format uses hash symbols and semicolons to mark comments:

# This is a comment in a typical .ini file

Flags

Flags control which options are enabled and disabled in an application or system. Flags can be enabled with the numeral 1 or the word true and disabled with the numeral 0 or the word false.

For example, the following code from an Ansible configuration files uses True to mark a flag related to temporary files:

; allow temp files to be world readable

allow_world_readable_tmpfiles = True

In the following example, the configuration file specifies whether the name of each task appears in the standard output:

; do not send task labels to the display

display_args_to_stdout = False

Settings

Settings assign constants to variable information, which enables the application to define operational parameters.

For example, an application might use the variable server to define the IP address of the application server and the variable port to define the communication port used by the server at the designated IP address:

; set the IP address and port for the application server

server = 192.1.2.62

port = 144

Paths

Applications routinely access locations to load or save important information, such as log files or plugins. Although default locations exist, it is common to stipulate storage devices and folder locations via paths and specific filenames. The application uses the preferred paths denoted in the configuration file.

The following example shows a path describing the drive and folder containing a configuration file called dbsettings.ini:

; location of the database config file

database_setup = "c:\\programs\\new\\dbsettings.ini"

Similarly, developers and administrators can use paths to delineate desired filenames. For example, a classic config.sys file can stipulate the location and name of the desired UI shell:

; the location and name of the UI shell in MS-DOS 5

shell = c:\dos\command.com

Working with configuration files

People use various tools to create and edit configuration files. Tools can help users find parameters within the file, convert to a different file format and accomplish other tasks.

Text editors such as Microsoft Windows Notepad and Linux GNU nano are some of the most common tools for editing human-readable files. Some text editors provide search and pattern-matching features to help users find and change content.

Other tools specialize in certain file formats. For example, JSON Editor Online is used to create and edit files in the JSON format, and Swagger Editor can convert YAML files to JSON. Additional editors exist for formats such as XML and TOML.

Tips for managing configuration files

IT teams managing configuration files should implement a system of comments, testing, version control and backups. Keep in mind the following best practices for configuration file management:

  • Use comments to document important activities taking place within the file, and write them in a way that others can understand.
  • Test configuration files thoroughly to ensure that the application or system works as intended.
  • Adopt a naming or version control convention that enables configuration file editors to track changes made over time, such as the introduction of a new path for storage, and see who made those changes.
  • Treat configuration files as critical and include them in backup schemes.

This was last updated in April 2023

Continue Reading About configuration file

  • Review the top configuration management tools in DevOps
  • 4 steps to implement an IT configuration management process
  • Understand IT change management vs. configuration management
  • Why configuration management is important for networks
  • Ansible vs. Chef vs. Puppet vs. SaltStack: A comparison

Related Terms

continuous delivery (CD)
Continuous delivery (CD) is an approach for software delivery in which development teams produce and test code in short but ...Seecompletedefinition
declarative programming
Declarative programming is a method to abstract the control flow for logic required for software to perform an action. Instead, ...Seecompletedefinition
IT service delivery
IT service delivery is the way a corporation provides users access to IT services, such as applications, data storage and other ...Seecompletedefinition

Dig Deeper on Systems automation and orchestration

What is configuration file? | Definition from TechTarget (2024)

FAQs

What is a configuration definition file? ›

A configuration file, often shortened to config file, defines the parameters, options, settings and preferences applied to operating systems (OSes), infrastructure devices and applications in an IT context. Software and hardware devices can be profoundly complex, supporting myriad options and parameters.

What is configuration file description? ›

In computing, configuration files (commonly known simply as config files) are files used to configure the parameters and initial settings for some computer programs or applications, server processes and operating system settings.

What is the description of configuration? ›

: something (such as a figure, contour, pattern, or apparatus) that results from a particular arrangement of parts or components. c. : the stable structural makeup of a chemical compound especially with reference to the space relations of the constituent atoms.

What is the definition of config? ›

The config of a computer system is the way in which all its parts, such as the hardware and software, are connected together in order for the computer to work. Config is short for ' configuration'.

Why are configuration files important? ›

Configuration files are vital because they allow users and developers to alter the behavior of an application without having to change the program's source code. This is particularly useful in large, complex systems where changing the source code can be risky and time-consuming.

What is file based configuration? ›

Often configuration properties are stored in files on the user's hard disk, e.g. in . properties files or as XML documents. In order to access this data, functionality is needed to select the configuration files, load them into memory, and write changes back to disk.

What is the purpose of the configuration document? ›

Configuration management documentation verifies that changes are implemented as prescribed and that documentation of objects and systems reflects their specified configuration.

What is application configuration file? ›

An application configuration file contains settings that are specific to an app. This file includes configuration settings that the common language runtime reads (such as assembly binding policy, remoting objects, and so on), and settings that the app can read.

What is Project configuration file? ›

The project configuration file drives how content is loaded into the project. The goals of this file are to severely limit or eliminate the need for a developer to modify the HTML, CSS, and JavaScript code provided by Crestron in the template.

What is a configuration example? ›

When you position items into any spatial arrangement, you are creating a configuration, or specific shape. For example, scientists refer to the specific, bonded arrangement of atoms to make a molecule as a configuration.

What is configuration item definitions? ›

A configuration item (CI) is any service component, infrastructure element, or other item that needs to be managed in order to ensure the successful delivery of services.

What is the most appropriate definition of configuration? ›

Generally, a configuration is the arrangement - or the process of making the arrangement - of the parts that make up a whole.

What is meant by configuration file? ›

A file that contains data about a specific user, program, computer or file. Used for myriad reasons, configuration files are generally read at startup by the operating system as well as by applications in order to customize the environment for the user.

What does configuration mean in software? ›

In the simplest terms of computers and technology, the definition of configuration pertains to the arrangement of the hardware and software of IT system. Management of the components, settings and more ensures all IT systems can function smoothly and gives you greater control over the devices on your network.

What is configuration data? ›

The term "Configuration data" describes data that is not processed by an application in the usual sense, such as creating a report from a database, for example, but is used to control the behavior of an application.

Can I delete configuration files? ›

If your database is not stored on a high performance database server, ensure you regularly purge unused config history. A scheduled job automatically deletes older configs from the database. You can also delete individual config files manually.

What is a configuration document? ›

Definition. document that defines the requirements for function, design, build, production, and verification for a configuration item.

What is the use of CFG file? ›

CFG or . CONFIG file extension is a configuration file used by various programs to store settings that are specific to their respective software. Some configuration files are plain text files, but others might be stored in a format specific to the program.

What is the difference between property file and configuration file? ›

What's the distinction? Properties are declared for resources one-by-one in properties. yml files. Configs can be defined there, nested under a config property.

Top Articles
Latest Posts
Article information

Author: Delena Feil

Last Updated:

Views: 6082

Rating: 4.4 / 5 (65 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Delena Feil

Birthday: 1998-08-29

Address: 747 Lubowitz Run, Sidmouth, HI 90646-5543

Phone: +99513241752844

Job: Design Supervisor

Hobby: Digital arts, Lacemaking, Air sports, Running, Scouting, Shooting, Puzzles

Introduction: My name is Delena Feil, I am a clean, splendid, calm, fancy, jolly, bright, faithful person who loves writing and wants to share my knowledge and understanding with you.