# LibTmux::Session

- **Module:** LibTmux
- **Package:** libtmux
- **Language:** Ruby
- **Kind:** class
- **Source:** https://github.com/libtmux/libtmux-ruby/blob/da7b6191b9439e3c84fa1c9eeaa9168263ee7af4/gems/libtmux/lib/libtmux/entity.rb#L78
- **Bases:** [`LibTmux::Entity`](/en/ruby/v0.1.1/reference/libtmux-entity-bg78/)
- **Page:** https://libtmux.org/en/ruby/v0.1.1/reference/libtmux-session-nvps/

## Members

### Parent objects

- [`server`](/en/ruby/v0.1.1/reference/libtmux-session-server/) (method): Returns the value of attribute server.

### Collections and queries

- [`list_windows`](/en/ruby/v0.1.1/reference/libtmux-session-list_windows/) (method): Behavior: Live acquisition.
- [`list_panes`](/en/ruby/v0.1.1/reference/libtmux-session-list_panes/) (method): Behavior: Live acquisition.

### Common operations

- [`new_window`](/en/ruby/v0.1.1/reference/libtmux-session-new_window/) (method): Behavior: Creation.
- [`kill`](/en/ruby/v0.1.1/reference/libtmux-session-kill/) (method): Both allowlists are required for guarded deletion of a changing topology.
- [`rename`](/en/ruby/v0.1.1/reference/libtmux-session-rename/) (method): Behavior: Entity mutation.
- [`hooks`](/en/ruby/v0.1.1/reference/libtmux-session-hooks/) (method): Behavior: Options and hooks.
- [`link_window`](/en/ruby/v0.1.1/reference/libtmux-session-link_window/) (method): Behavior: Window links.
- [`options`](/en/ruby/v0.1.1/reference/libtmux-session-options/) (method): Behavior: Options and hooks.
- [`environment`](/en/ruby/v0.1.1/reference/libtmux-session-environment/) (method): Behavior: Environment.
- [`set_environment`](/en/ruby/v0.1.1/reference/libtmux-session-set_environment/) (method): Behavior: Environment.
- [`unset_environment`](/en/ruby/v0.1.1/reference/libtmux-session-unset_environment/) (method): Behavior: Environment.
- [`list_window_links`](/en/ruby/v0.1.1/reference/libtmux-session-list_window_links/) (method): Behavior: Live acquisition.

### Other members

- [`==`](/en/ruby/v0.1.1/reference/libtmux-session-1xn2/) (method): Behavior: Live handles.
- [`display`](/en/ruby/v0.1.1/reference/libtmux-session-display/) (method): Behavior: Formats.
- [`eql?`](/en/ruby/v0.1.1/reference/libtmux-session-eql/) (method): Behavior: Live handles.
- [`hash`](/en/ruby/v0.1.1/reference/libtmux-session-hash/) (method): Behavior: Live handles.
- [`id`](/en/ruby/v0.1.1/reference/libtmux-session-id/) (method): Behavior: Live handles.
- [`inspect`](/en/ruby/v0.1.1/reference/libtmux-session-inspect/) (method): Behavior: Live handles.
- [`ref`](/en/ruby/v0.1.1/reference/libtmux-session-ref/) (method): Returns the value of attribute ref.
- [`snapshot`](/en/ruby/v0.1.1/reference/libtmux-session-snapshot/) (method): Behavior: Snapshot acquisition.

## Guides

Pages that discuss `Session`.

- [Server, session, window, pane](/en/ruby/v0.1.1/concepts/server-session-window-pane/)

## In other ports

A tmux session

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Session`](/en/py/latest/reference/libtmux-session/) (class) |
| Lua | [`libtmux.Session`](/en/lua/latest/reference/libtmux-session/) (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) |
