# libtmux.Server.getenv

- **Module:** libtmux.Server
- **Package:** libtmux
- **Language:** Python
- **Kind:** method
- **Source:** https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L207
- **Page:** https://libtmux.org/en/py/latest/reference/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
