# Server.sessions()

- **Module:** Server
- **Package:** libtmux-swift
- **Language:** Swift
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-swift/blob/f02a4668570e1cc5198c941413750e021f42c214/Sources/LibTmux/Server.swift#L197
- **Page:** https://libtmux.org/reference/swift/server-sessions()/

```
Server.sessions()() -> [Session]
```

Every session on this server, in tmux's own order.

Use ``isRunning()`` when absence is an expected probe; a failed listing
throws rather than impersonating a running server with no sessions.

## Raises

- `TmuxError`
