# session.Session.kill

- **Module:** session.Session
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/8a648c0894dfffc9303583f753b6c8ae01f2fe76/crates/libtmux/src/session.rs#L565
- **Page:** https://libtmux.org/reference/rs/session-session-kill/

```
session.Session.kill(self) -> Result<(), Error>
```

Kill the session.

This consumes the handle: every other handle to the same session is now
stale, and refreshing one reports [`Error::ObjectGone`].

# Errors

Returns an error when tmux refuses the command.
