# LibTmux.Session.id

- **Module:** LibTmux
- **Package:** libtmux
- **Language:** Elixir
- **Kind:** property
- **Source:** https://github.com/libtmux/libtmux-elixir/blob/5bacf40788b43a5af27bb3656e727a921ba2db40/lib/libtmux/entities.ex
- **Page:** https://libtmux.org/en/elixir/pr-173/reference/libtmux-session-id/

Required: building the struct without this key is an error.

## In other ports

A session's stable tmux id

| Port | API | Differs from Elixir |
| --- | --- | --- |
| Elixir | `LibTmux.Session.id`. Required: building the struct without this key is an error. | This page |
| Python | [`libtmux.Session.id`](/en/py/latest/reference/libtmux-session-id/) (property). Alias of Session.session_id. | None recorded in the model |
| Ruby | [`LibTmux::SessionSnapshot#id`](/en/ruby/latest/reference/libtmux-sessionsnapshot-id/) (method). Behavior: Captured records. | None recorded in the model |
| Lua | [`libtmux.SnapshotSession.id`](/en/lua/latest/reference/libtmux-snapshotsession-id/) (attribute) | None recorded in the model |
| Rust | [`session.Session.id`](/en/rs/latest/reference/session-session-id/) (method). Return the tmux session identity. | None recorded in the model |
| Go | [`tmux.Session.ID`](/en/go/latest/reference/tmux-session-id/) (method). ID returns the stable tmux identity of this session. | None recorded in the model |
| Java | [`io.github.libtmux.Session.id`](/en/java/latest/reference/io-github-libtmux-session-session-id/) (method). The session's stable id. | None recorded in the model |
| C# | [`LibTmux.Session.Id`](/en/csharp/latest/reference/libtmux-session-id/) (property). Gets the session identifier. | None recorded in the model |
| C++ | [`libtmux::Session::id`](/en/cxx/latest/reference/libtmux-session-id-yxxu/) (method) | readonly |
| Swift | [`Session.id`](/en/swift/latest/reference/session-id/) (property). tmux's own session id, stable for the session's lifetime — $0, $1. Names are not: a session can be renamed, and two servers can both have a 0. | None recorded in the model |
| OCaml | [`Libtmux.Session.id`](/en/ocaml/latest/reference/libtmux-session-id-12gy/) (function) | None recorded in the model |
| Perl | [`LibTmux::Session::id`](/en/perl/latest/reference/libtmux-session-id/) (method). string. Local captured data; no I/O. | Schema-validated captured data; reading performs no tmux I/O. |
| Raku | [`LibTmux::Model::Session.id`](/en/raku/latest/reference/libtmux-model-session-id/) (method). Captured session_id; local session-id access. | None recorded in the model |

No Haskell equivalent. No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.

No TypeScript equivalent. no accessor; the field is read from `Session.format`, tmux's own row

No equivalent is recorded in PowerShell, Julia, Erlang, Common Lisp, Clojure, Kotlin, Scala or F#.
