# session.Session.id

- **Module:** session.Session
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/f0e37052c232636b61d095817046e6bfc8f2ca40/crates/libtmux/src/session.rs#L197
- **Page:** https://libtmux.org/en/rs/latest/reference/session-session-id/

```
session.Session.id(self) -> &SessionId
```

Return the tmux session identity.

This is the `$`-prefixed id tmux assigns, which is stable across
renames. It is always present.

## Example

```rust
let guard = libtmux::test::TestServer::new().await?;
let session = guard.session("work").await?;

assert!(session.id().to_string().starts_with('$'));

guard.shutdown().await?;
```
