# window.Window.kill

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

```
window.Window.kill(self) -> Result<(), Error>
```

Kill the window, closing it in every session that links it.

This consumes the handle. Use [`Window::unlink`] to remove only this
session's link while leaving the window alive elsewhere.

# Errors

Returns an error when tmux refuses the command.
