---
name: "function::env_var"
section: "3stap"
platform: "linux"
package: "systemtap-doc"
version: "5.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/function::env_var"
---

# function::env\_var(3stap)

Fetch environment variable from current process

## NAME

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

## SYNOPSIS

```
    env_var:string(name:string)
```

## ARGUMENTS

*name*

Name of the environment variable to fetch

## 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

[*tapset::context-envvar*(3stap)](/tapset::context-envvar/3stap.md)
