# LibTmux.Server.HasSessionAsync

- **Module:** LibTmux.Server
- **Package:** LibTmux
- **Language:** .NET
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/320dc64f4b8b7815842471327a5e6b84a1499bf8/src/LibTmux/Server.Lifecycle.cs#L95
- **Page:** https://libtmux.org/en/dotnet/latest/reference/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.
