# libtmux.Session.getenv

- **Module:** libtmux
- **Package:** libtmux
- **Language:** Python
- **Kind:** method
- **Source:** https://github.com/tmux-python/libtmux/blob/38e368c11117fb4aeb2f082d552cd4f210eae06a/src/libtmux/common.py#L207
- **Inherited from:** libtmux.common.EnvironmentMixin
- **Page:** https://libtmux.org/en/py/stable/reference/libtmux-session-getenv/

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

Show environment variable [`$ tmux show-environment -t [session] <name>`](/en/tmux/latest/manual/show-environment/).

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

## Parameters

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

## Returns

str
    Value of environment variable
