# libtmux.WindowLink:link

- **Module:** libtmux
- **Package:** libtmux
- **Language:** Lua
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-lua/blob/d68f829fe097e38dcbbf7147e276666fe615f0cf/lua/libtmux/_internal/entity.lua#L468
- **Page:** https://libtmux.org/en/lua/v0.1.1/reference/libtmux-windowlink-link/

```
link: fun(
  self: libtmux.WindowLink,
  destination: libtmux.LinkDestination,
  options?: libtmux.LinkOptions,
):libtmux.Request<boolean>
```

## Parameters

- `destination` (`libtmux.LinkDestination`)
- `options` (`libtmux.LinkOptions?`)

## tmux command

The tmux commands behind `link`.

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

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_link_window_entry`](/en/tmux/latest/reference/c-variable-cmd_link_window_entry/) (attribute)
- [`cmd_move_window_exec`](/en/tmux/latest/reference/c-function-cmd-move-window-c-cmd_move_window_exec/) (function)

## In other ports

Link a window into another session

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Window.link`](/en/py/latest/reference/libtmux-window-link/) (method) |
| Ruby | [`LibTmux::Session#link_window`](/en/ruby/latest/reference/libtmux-session-link_window/) (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.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) |

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