---
schema_version: "1"
id: 492b640696dbe4ef57034a7fe06f23f94b7c5cdecc7f61582cd3a87502ffd8d2
title: envVars
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.12/dw-system-functions-envvars.md
canonical_url: https://docs.mulesoft.com/dataweave/2.12/dw-system-functions-envvars
source_site: docs.mulesoft.com
content_type: documentation
content_hash: ea52d07f43e473f2dea8fd8c937dda0f496b05e1042133caf02535a2e6cac068
description: MuleSoft Documentation Site
release: "2.12"
latest: false
---
---
product: DataWeave
version: 2.12
---

# envVars

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

## envVars(): Dictionary<String>

Returns all the environment variables defined in the host system as an array of strings.

### Example

This example returns a Mac command console (`SHELL`) path. `SHELL` is one of the standard Mac
environment variables. To return all the environment variables, you can use `dw::System::envVars()`.

#### Source

```DataWeave
%dw 2.0
import dw::System
output application/json
---
{ "envVars" : dw::System::envVars().SHELL }
```

#### Output

```JSON
{ "envVars": "/bin/bash" }
```
