# libtmux.Server.getenv

- **Module:** libtmux.Server
- **Package:** libtmux
- **Language:** Python
- **Kind:** method
- **Source:** https://github.com/tmux-python/libtmux/blob/036c521c4b83ce6e434eb50afe2a0d08a6a05e46/src/libtmux/common.py#L207
- **Page:** https://libtmux.org/reference/py/libtmux-server-getenv/

```
libtmux.Server.getenv(self, name: str) -> str | bool | None
```

Show environment variable ``$ tmux show-environment -t [session] <name>``.

Return the value of a specific variable if the name is specified.

## Parameters

- `self`
- `name` (str) — the environment variable name. such as 'PATH'.

## Returns

str
    Value of environment variable
