feature flag
also: feature toggle, feature switch, feature bit
A configuration mechanism that allows developers to enable or disable specific features in software at runtime without redeploying code, commonly used for gradual rollouts and A/B testing.
A feature flag (or feature toggle) is a conditional statement in code that controls whether a feature is active or inactive. Instead of deploying new code and immediately enabling it for all users, developers can wrap new functionality behind a flag that can be toggled on or off dynamically.
In Linux environments, feature flags are typically managed through configuration files, environment variables, or dedicated flag management services. For example, an application might check if (FEATURE_FLAG_NEW_UI == true) before executing new code paths.
Common use cases include: canary deployments (enabling features for a small percentage of users first), A/B testing (comparing feature variants), and kill switches (quickly disabling broken features without redeployment). Feature flags can be managed locally in config files or through centralized services like LaunchDarkly or Unleash.