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

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