# LibTmux.Session.RenameAsync

- **Module:** LibTmux.Session
- **Package:** LibTmux
- **Language:** .NET
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/6656a563ec9e07ab52e0c3ac96f7704fc94cc0c0/src/LibTmux/Session.Lifecycle.cs#L73
- **Page:** https://libtmux.org/reference/dotnet/libtmux-session-renameasync/

```
LibTmux.Session.RenameAsync(name: string, cancellationToken: CancellationToken) -> Task<Session>
```

Renames this session.

tmux expands the name as a format, so a <c>#</c> in it does not survive
verbatim.

## Parameters

- `name` (string) — The new name.
- `cancellationToken` (CancellationToken) — Cancels the tmux command.

## Returns

A replacement handle carrying the new name.
