← Dictionary
Dictionary · Dev

What is Environment Variables?

They are small identifiers that hold the settings and secret keys that programs need at run time.

Overview

It allows you to keep information at the system level, such as passwords, API keys or different server addresses, that you should not write in your code. While the program is running, it reads these variables and acts accordingly. Thus, the same code can run in different environments with different settings.

Analogy: Instead of hard-coded settings inside a device, it's like a settings card that's built into the device and can be changed each time.

How it works

It is defined through the operating system or a special file, and when the program starts, it memorizes these values.

Where it is used

It is used in server installations, application configurations and all software projects that require security.

Commonly confused with

It should not be confused with hardcoded values ​​written into the code, because this method creates a security risk.

Frequently asked questions

Why should we keep these variables private?

To prevent your passwords from being compromised when you share your code.

Related terms

Related tools

This explanation was written in plain language for TreScout · translated from the Turkish original. If something looks wrong or missing, write to hello@trescout.com. Read in Turkish →