# libtmux.Server:get_environment

- **Module:** libtmux
- **Package:** libtmux
- **Language:** Lua
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-lua/blob/d68f829fe097e38dcbbf7147e276666fe615f0cf/lua/libtmux/_internal/server.lua#L755
- **Page:** https://libtmux.org/en/lua/v0.1.1/reference/libtmux-server-get_environment/

```
get_environment: fun(
  self: libtmux.Server,
  name: string,
  options?: libtmux.EnvironmentGetOptions,
):libtmux.Request<libtmux.EnvironmentRecord>
```

## Parameters

- `name` (`string`)
- `options` (`libtmux.EnvironmentGetOptions?`)

## tmux command

The tmux commands behind `get_environment`.

- [`show-environment`](/en/tmux/latest/manual/show-environment/)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_show_environment_entry`](/en/tmux/latest/reference/c-variable-cmd_show_environment_entry/) (attribute)
- [`cmd_show_environment_exec`](/en/tmux/latest/reference/c-function-cmd-show-environment-c-cmd_show_environment_exec/) (function)
