# LibTmux.Server.HasSessionAsync

- **Module:** LibTmux.Server
- **Package:** LibTmux
- **Language:** .NET
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/6656a563ec9e07ab52e0c3ac96f7704fc94cc0c0/src/LibTmux/Server.Lifecycle.cs#L95
- **Page:** https://libtmux.org/reference/dotnet/libtmux-server-hassessionasync/

```
LibTmux.Server.HasSessionAsync(target: string, exact: bool, cancellationToken: CancellationToken) -> Task<bool>
```

Reports whether a session exists.

## Parameters

- `target` (string) — The session to look for.
- `exact` (bool) — Whether the name must match in full.
- `cancellationToken` (CancellationToken) — Cancels the tmux command.

## Returns

True when tmux reports the session.
