> For the complete documentation index, see [llms.txt](https://cajac.gitbook.io/ctf-notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cajac.gitbook.io/ctf-notes/terminals/tmux.md).

# Tmux

**tmux** enables a number of terminals (or windows) to be accessed and controlled from a single terminal like screen. tmux runs as a server-client system. A server is created automatically when necessary and holds a number of sessions, each of which may have a number of windows linked to it. Any number of clients may connect to a session, or the server may be controlled by issuing commands with tmux.

Communication takes place through a socket, by default placed in /tmp. Moreover tmux provides a consistent and well-documented command interface, with the same syntax whether used interactively, as a key binding, or from the shell. It offers a choice of vim or Emacs key layouts.

## Session Handling

## Window Handling

<table><thead><tr><th width="195">Shortcut</th><th>Description</th></tr></thead><tbody><tr><td><code>Ctrl+b</code>   <code>c</code></td><td>Create a new window</td></tr><tr><td><code>Ctrl+b</code>   <code>n</code></td><td>Next window</td></tr><tr><td><code>Ctrl+b</code>   <code>p</code></td><td>Previous window</td></tr><tr><td><code>Ctrl+b</code>   <code>0</code>  through <code>Ctrl+b</code>   <code>9</code></td><td>Jump directly to window 0-9</td></tr><tr><td><code>Ctrl+b</code>   <code>w</code></td><td>See a nice window picker</td></tr></tbody></table>

## Usage information

<details>

<summary>tmux -h</summary>

```bash
┌──(kali㉿kali)-[~]
└─$ tmux -h    
tmux: unknown option -- h
usage: tmux [-2CDlNuVv] [-c shell-command] [-f file] [-L socket-name]
            [-S socket-path] [-T features] [command [flags]]

```

</details>

## Resources

Tmux - GitHub: <https://github.com/tmux/tmux>

Tmux - Kali Tools: <https://www.kali.org/tools/tmux/>

Tmux - Wiki: <https://github.com/tmux/tmux/wiki>
