# LibTmux::Session#link_window

- **Module:** LibTmux
- **Package:** libtmux
- **Language:** Ruby
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ruby/blob/dcc9f8b5a6970144a9e7d80cd5f381d8f6198372/gems/libtmux/lib/libtmux/operations.rb#L268
- **Page:** https://libtmux.org/en/ruby/v0.1.0.alpha.2/reference/libtmux-session-link_window/

tmux command: [`link-window`](/en/tmux/latest/manual/link-window/)

```
def link_window: (
  ::LibTmux::EntityRef,
  index: ::Integer,
  ?timeout: ::Numeric,
  ?cancel: untyped
) -> ::LibTmux::CommandResult
```

Behavior: Window links.

Behavior contract: Window links.

## Raises

- `ArgumentError`

## In other ports

### Link a window into another session

- Python: [`libtmux.Window.link`](/en/py/latest/reference/libtmux-window-link/) (method)
- Lua: [`libtmux.WindowLink:link`](/en/lua/latest/reference/libtmux-windowlink-link/) (method)
- TypeScript: [`window.Window.link`](/en/ts/latest/reference/window-window-link/) (method)
- Rust: [`window.Window.link_to`](/en/rs/latest/reference/window-window-link_to/) (method)
- Go: [`tmux.Window.Link`](/en/go/latest/reference/tmux-window-link/) (method)
- Java: [`io.github.libtmux.Window.Window.linkTo`](/en/java/latest/reference/io-github-libtmux-window-window-linkto/) (method)
- C#: [`LibTmux.Window.LinkAsync`](/en/csharp/latest/reference/libtmux-window-linkasync/) (method)
- C++: [`libtmux::Window::link_to`](/en/cxx/latest/reference/libtmux-window-link_to/) (method)
- Swift: [`Server.link(_:into:)`](/en/swift/latest/reference/server-link(_-into-)/) (method)
