# LibTmux::Window#kill

- **Module:** LibTmux
- **Package:** libtmux
- **Language:** Ruby
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ruby/blob/da7b6191b9439e3c84fa1c9eeaa9168263ee7af4/gems/libtmux/lib/libtmux/entity.rb#L87
- **Public owner:** LibTmux::Entity#kill
- **Page:** https://libtmux.org/en/ruby/v0.1.1/reference/libtmux-window-kill/

```
def kill: (
  ?timeout: ::Numeric,
  ?cancel: untyped
) -> ::LibTmux::CommandResult
```

Behavior: Entity removal.

Behavior contract: Entity removal.

## Parameters

- `timeout` (`::Numeric`)
- `cancel` (`untyped`)

## tmux command

The tmux commands behind `kill`.

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

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_kill_window_entry`](/en/tmux/latest/reference/c-variable-cmd_kill_window_entry/) (attribute)
- [`cmd_kill_window_exec`](/en/tmux/latest/reference/c-function-cmd-kill-window-c-cmd_kill_window_exec/) (function)

## In other ports

Close a window

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Window.kill`](/en/py/latest/reference/libtmux-window-kill/) (method) |
| Lua | [`libtmux.Window:kill`](/en/lua/latest/reference/libtmux-window-kill/) (method) |
| TypeScript | [`window.Window.kill`](/en/ts/latest/reference/window-window-kill/) (method) |
| Rust | [`window.Window.kill`](/en/rs/latest/reference/window-window-kill/) (method) |
| Go | [`tmux.Window.Kill`](/en/go/latest/reference/tmux-window-kill/) (method) |
| Java | [`io.github.libtmux.Window.kill`](/en/java/latest/reference/io-github-libtmux-window-window-kill/) (method) |
| C# | [`LibTmux.Window.KillAsync`](/en/csharp/latest/reference/libtmux-window-killasync/) (method) |
| C++ | [`libtmux::Window::kill`](/en/cxx/latest/reference/libtmux-window-kill/) (method) |
| Swift | [`Server.kill(_:)`](/en/swift/latest/reference/server-kill(_-)/) (method) |

No equivalent is recorded in PowerShell, Julia, Elixir, Kotlin, Scala or F#.
