FUNCTION::ENV\_VAR(3stap) Context Functions FUNCTION::ENV\_VAR(3stap)

# [NAME](#NAME)

function::env\_var - Fetch environment variable from current process

# [SYNOPSIS](#SYNOPSIS)

```


    env_var:string(name:string)
```

# [ARGUMENTS](#ARGUMENTS)

*name*

Name of the environment variable to fetch

# [DESCRIPTION](#DESCRIPTION)

Returns the contents of the specified environment value for the current process. If the variable isn't set an empty string is returned.

# [SEE ALSO0](#SEE_ALSO0)

[*tapset::context-envvar*(3stap)](/man/enterprise-packages/systemtap/tapset::context-envvar.3stap)

September 2026 SystemTap Tapset Reference Ver

---

Document: function::env_var(3stap) from systemtap 5.6-r0 (Chainguard OS)
Source: https://sourceware.org/git/systemtap.git
