# Libtmux_unix.Client.kill_server

- **Module:** Libtmux_unix
- **Package:** libtmux-unix
- **Language:** OCaml
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-ocaml/blob/2d1ad87c94730daaa2569d4589fe53f9edc2962b/unix/libtmux_unix.mli#L723
- **Public owner:** Libtmux_unix
- **Page:** https://libtmux.org/en/ocaml/latest/reference/libtmux_unix-client-kill_server/

```
val kill_server :
  ?cancel:Cancellation.t -> t -> (unit, Libtmux.Error.t) result
```

Stop the whole tmux server: destroy every session and window and close every client. The command has no reply. A backend reports success when the daemon it is bound to has exited, then retires its own connection; other clients of that daemon see it disconnect.

## Parameters

- `cancel?` (`Cancellation.t`)
- `arg1` (`t`)

## tmux command

The tmux commands behind `kill_server`.

- [`kill-server`](/en/tmux/latest/manual/kill-server/)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_kill_server_entry`](/en/tmux/latest/reference/c-variable-cmd_kill_server_entry/) (attribute)
- [`cmd_kill_server_exec`](/en/tmux/latest/reference/c-function-cmd-kill-server-c-cmd_kill_server_exec/) (function)
