# Environment Variable

*noun*

say it: **“en-VY-run-ment VAIR-ee-uh-bul”** **/ɛnˈvaɪrənmənt ˈvɛəriəbəl/**

A named setting, such as the user name or the temp folder, that the computer gives to every program it starts.

## What is an **environment variable**?

An **environment variable** is a named setting that Windows, macOS and Linux hand to every program they start, such as the user's name, the temp folder and `PATH`. Programs read them to fit in with the computer they run on. In PowerShell, `$env:NAME` reads or sets one for this session.

```powershell
$env:USERNAME         # Sam
$env:POWER = 'on'     # programs started from here can read it
```

## In a sentence

- “TEMP is an **environment variable** that tells programs where to put scratch files.”
- “The kettle-bot script reads the **environment variable** POWER before it starts.”

Level: Apprentice · [More Operating System terms at this level](https://www.ask-codey.com/glossary?category=operating-system&level=2)

Updated: November 10, 2026

## In other subjects

- [Environment Variable in Python](https://www.ask-codey.com/glossary/environment-variable)
- [Environment Variable in Unix](https://www.ask-codey.com/glossary/environment-variable-unix)

Source: https://www.ask-codey.com/glossary/environment-variable-operating-system
