$linuxjunkies
>

desired state

also: declarative configuration, Infrastructure as Code (IaC), idempotent configuration

A configuration management concept where you declare what you want a system to look like, and tools automatically make it match that target state, rather than manually issuing commands to change it.

Desired state is a declarative approach to system configuration where you specify the end goal rather than the steps to reach it. Instead of running individual commands to install packages, edit files, or adjust settings, you describe what the final system should look like, and a tool (like Ansible, Puppet, or Salt) ensures the actual system matches that description.

For example, rather than manually running apt install nginx, editing /etc/nginx/nginx.conf, and starting the service, you might declare: "I want nginx installed, with this config file, and the service running." The tool detects the current state and makes whatever changes are needed to reach that goal—idempotently, meaning running it multiple times produces the same safe result.

This approach is central to Infrastructure as Code and configuration management, making systems reproducible, auditable, and easier to maintain at scale.

Related terms