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

# 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" }
```
