# LibTmux.Server.new_session!/3

- **Module:** LibTmux
- **Package:** libtmux
- **Language:** Elixir
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-elixir/blob/00d34b3d387da72a5a416f1dd3962a98c76cedd2/lib/libtmux/server.ex#L471
- **Page:** https://libtmux.org/en/elixir/latest/reference/libtmux-server-new_session-bang-3/

```
new_session!(server, name, options \\ [])
@spec new_session!(t(), binary(), [
        LibTmux.Action.creation_option()
      ]) :: LibTmux.Action.creation_value()
```

Returns the created session value when `new_session/3` completes; raises the original error otherwise.

## Parameters

- `server` (`t()`)
- `name` (`binary()`)
- `options` (`[LibTmux.Action.creation_option()]`)
  Default: `[]`.

## Guides

Pages that discuss `new_session!/3`.

- [Attaching to tmux](/en/elixir/latest/guides/attaching-to-tmux/)
- [Getting started](/en/elixir/latest/guides/overview/)
