# libtmux.Session

- **Module:** libtmux
- **Package:** libtmux
- **Language:** Lua
- **Kind:** class
- **Source:** https://github.com/libtmux/libtmux-lua/blob/d68f829fe097e38dcbbf7147e276666fe615f0cf/lua/libtmux/_internal/entity.lua#L421
- **Page:** https://libtmux.org/en/lua/v0.1.1/reference/libtmux-session/

A tmux session.

## Members

### Common operations

- [`new_window`](/en/lua/v0.1.1/reference/libtmux-session-new_window/) (method)
- [`kill`](/en/lua/v0.1.1/reference/libtmux-session-kill/) (method)
- [`rename`](/en/lua/v0.1.1/reference/libtmux-session-rename/) (method)
- [`list_environment`](/en/lua/v0.1.1/reference/libtmux-session-list_environment/) (method)
- [`set_environment`](/en/lua/v0.1.1/reference/libtmux-session-set_environment/) (method)
- [`unset_environment`](/en/lua/v0.1.1/reference/libtmux-session-unset_environment/) (method)
- [`remove_environment`](/en/lua/v0.1.1/reference/libtmux-session-remove_environment/) (method)
- [`attach`](/en/lua/v0.1.1/reference/libtmux-session-attach/) (method)
- [`navigate_window`](/en/lua/v0.1.1/reference/libtmux-session-navigate_window/) (method)
- [`renumber_windows`](/en/lua/v0.1.1/reference/libtmux-session-renumber_windows/) (method)

### Other members

- [`get_environment`](/en/lua/v0.1.1/reference/libtmux-session-get_environment/) (method): Requires an interactive terminal capability; current adapters return unsupported_tty.

## Inherited members

- [`list_hooks`](/en/lua/v0.1.1/reference/libtmux-session-list_hooks/) (method), inherited from `libtmux.Configurable`
- [`set_option`](/en/lua/v0.1.1/reference/libtmux-session-set_option/) (method), inherited from `libtmux.Configurable`
- [`unset_option`](/en/lua/v0.1.1/reference/libtmux-session-unset_option/) (method), inherited from `libtmux.Configurable`
- [`set_hook`](/en/lua/v0.1.1/reference/libtmux-session-set_hook/) (method), inherited from `libtmux.Configurable`
- [`get_option`](/en/lua/v0.1.1/reference/libtmux-session-get_option/) (method), inherited from `libtmux.Configurable`
- [`unset_hook`](/en/lua/v0.1.1/reference/libtmux-session-unset_hook/) (method), inherited from `libtmux.Configurable`
- [`get_hook`](/en/lua/v0.1.1/reference/libtmux-session-get_hook/) (method), inherited from `libtmux.Configurable`
- [`list_options`](/en/lua/v0.1.1/reference/libtmux-session-list_options/) (method), inherited from `libtmux.Configurable`
- [`reference`](/en/lua/v0.1.1/reference/libtmux-session-reference/) (method), inherited from `libtmux.Entity`
- [`run_hook`](/en/lua/v0.1.1/reference/libtmux-session-run_hook/) (method), inherited from `libtmux.Configurable`
- [`snapshot`](/en/lua/v0.1.1/reference/libtmux-session-snapshot/) (method), inherited from `libtmux.Entity`

## Guides

Pages that discuss `Session`.

- [Capture server state](/en/lua/v0.1.1/guides/snapshots/)

## In other ports

A tmux session

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Session`](/en/py/latest/reference/libtmux-session/) (class) |
| Ruby | [`LibTmux::Session`](/en/ruby/latest/reference/libtmux-session-nvps/) (class) |
| PowerShell | [`LibTmux\Get-TmuxSession`](/en/powershell/latest/reference/libtmux-get-tmuxsession/) (cmdlet). This cmdlet reads and returns shared .NET `LibTmux.Session` objects. Child windows and panes require further acquisition. |
| Julia | [`LibTmux.SessionSnapshot`](/en/julia/latest/reference/libtmux-sessionsnapshot/) (struct). `SessionSnapshot` holds captured session data. Actions use its `SessionRef`, a typed identity bound to an observed daemon generation. |
| Elixir | [`LibTmux.Session`](/en/elixir/latest/reference/libtmux-session/) (struct). `Session` is an immutable observation. Fields not captured read as `:unloaded`. |
| TypeScript | [`session.Session`](/en/ts/latest/reference/session-session/) (class) |
| Rust | [`session.Session`](/en/rs/latest/reference/session-session/) (struct) |
| Go | [`tmux.Session`](/en/go/latest/reference/tmux-session/) (struct) |
| Java | [`io.github.libtmux.Session`](/en/java/latest/reference/io-github-libtmux-session-session/) (class) |
| Kotlin | [`io.github.libtmux.kotlin.Session`](/en/kotlin/latest/reference/io-github-libtmux-kotlin-session/) (class) |
| Scala | [`io.github.libtmux.scaladsl.Session`](/en/scala/latest/reference/io-github-libtmux-scaladsl-session/) (typealias) |
| C# | [`LibTmux.Session`](/en/csharp/latest/reference/libtmux-session/) (class) |
| F# | [`LibTmux.FSharp.Session`](/en/fsharp/latest/reference/libtmux-fsharp-session/) (module). This F# module builds deferred child queries from a shared .NET `LibTmux.Session` and its server association. `Query.list` acquires their results from tmux. |
| C++ | [`libtmux::Session`](/en/cxx/latest/reference/libtmux-session/) (class) |
| Swift | [`Session`](/en/swift/latest/reference/session/) (struct) |
