# server.Server.showEnvironment

- **Module:** server
- **Package:** libtmux
- **Language:** TypeScript
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ts/blob/073b9d7dedad900bff6f5ec0ea47794e40225870/packages/libtmux/src/server.ts#L1224
- **Page:** https://libtmux.org/en/ts/latest/reference/server-server-showenvironment/

```
showEnvironment(): Promise<
  ReadonlyMap<string, EnvironmentValue>
>
```

Every variable in the server's global environment.

A [`null`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/null) value is tmux's `-NAME`: present, and marked for removal from any
process tmux starts.

## Examples

```ts
const environment = await server.showEnvironment();
environment.get("EDITOR");
```

## tmux command

The tmux commands behind `showEnvironment`.

- [`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)

## Guides

Pages that discuss `showEnvironment`.

- [Environment](/en/ts/latest/topics/environment/)

## In other ports

Read the server's global environment

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Server.show_environment`](/en/py/latest/reference/libtmux-server-show_environment/) (method) |
| Ruby | [`LibTmux::Server#environment`](/en/ruby/latest/reference/libtmux-server-environment/) (method) |
| Lua | [`libtmux.Server:list_environment`](/en/lua/latest/reference/libtmux-server-list_environment/) (method) |
| Rust | [`server.Server.environment`](/en/rs/latest/reference/server-server-environment/) (method) |
| Go | [`tmux.Server.ShowEnvironment`](/en/go/latest/reference/tmux-server-showenvironment/) (method) |
| Java | no equivalent on `Server` |
| C# | [`LibTmux.Server.Environment`](/en/csharp/latest/reference/libtmux-server-environment/) (property) |
| C++ | no equivalent on `Server` |
| Swift | [`Server.environment(_:)`](/en/swift/latest/reference/server-environment(_-)/) (method) |

No equivalent is recorded in PowerShell, Julia, Elixir, Kotlin, Scala or F#.
