# io.github.libtmux.Server.Server.killServer

- **Module:** io.github.libtmux.Server.Server
- **Package:** io.github.libtmux:libtmux
- **Language:** Java
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-java/blob/c3517519ee799428a809ce6deb1708c8be289cd1/libtmux/src/main/java/io/github/libtmux/Server.java#L148
- **Page:** https://libtmux.org/reference/java/io-github-libtmux-server-server-killserver/

```
io.github.libtmux.Server.Server.killServer() -> void
```

Ends the tmux server and every session on it.

<p>Deliberately explicit and deliberately not what {@link #close()} does: closing a client is
not a reason to end everyone else's sessions.

<p>Killing a server that has already gone is not a failure. Which is harder to detect than it
sounds: tmux answers a doomed request with {@code no server running} most of the time, but
with {@code server exited unexpectedly} when it reaches a socket whose server is still
exiting — on every release from 3.3a onwards, and on one in five attempts on 3.7. So the
postcondition is checked rather than the wording, which has changed before and says nothing
a second look cannot answer better.
