# tmux.SessionFromEnv

- **Module:** tmux
- **Package:** github.com/libtmux/libtmux-go/tmux
- **Language:** Go
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-go/blob/52968a3181c1c9e6d1b26c565d4b170968ae61c0/tmux/from_env.go#L84
- **Page:** https://libtmux.org/en/go/latest/reference/tmux-sessionfromenv/

```
tmux.SessionFromEnv(ctx: context.Context, environment: map[string]string) -> (Session, error)
```

SessionFromEnv returns the canonical session containing the environment's pane. Nil reads the process environment; a nonnil empty map does not.
