> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt. For full content including API reference and SDK examples, see https://learning.postman.com/llms-full.txt.

# Create and manage environments from the Postman VS Code extension

You can add a set of variables to an environment that you can use in your requests. Variables are reusable values you can use in your API requests and scripts. Environments make it easier to change variables based on your work context, such as sending requests to a test or production server. When you switch between environments, all variables in your requests and scripts use the current environment's values.

To learn more about managing environments in Postman, see [Group sets of variables in Postman using environments](/docs/sending-requests/variables/managing-environments/).

## Add environment variables

To create an environment and add variables to it, do the following:

1. Select a workspace from the workspace dropdown list in the sidebar.
2. Click <img alt="Environment icon" src="https://assets.postman.com/postman-docs/aether-icons/entity-environment-stroke.svg#icon" width="16px" /> **Environments**.
3. Click <img alt="Add icon" src="https://assets.postman.com/postman-docs/aether-icons/action-add-stroke.svg#icon" width="16px" />.
4. [Add variables to the environment.](/docs/sending-requests/variables/managing-environments/#add-environment-variables)
5. Click **Save**.

You can also use the `Postman: Create a new Postman Environment` command from the [Command Palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette) to create an environment.

## Use environment variables

To use environment variables in a request, do the following:

1. Click <img alt="Collection icon" src="https://assets.postman.com/postman-docs/aether-icons/entity-collection-stroke.svg#icon" width="16px" /> **Collections**.
2. Select a request.
3. [Select an environment from the environment selector](/docs/sending-requests/variables/managing-environments/#switch-between-environments) in the top-right corner.