---
title: "sys | Grafana Cloud documentation"
description: "Learn about sys functions"
---

# sys

The `sys` namespace contains functions related to the system.

## sys.env

The `sys.env` function gets the value of an environment variable from the system Alloy is running on. If the environment variable doesn’t exist, `sys.env` returns an empty string.

### Examples

Alloy ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```alloy
> sys.env("HOME")
"/home/alloy"

> sys.env("DOES_NOT_EXIST")
""
```
