# tmux

> **Basic Commands**

* `tmux` -> start tmux
* `tmux ls` -> list sessions
* `CTRL+B then D` -> Detach Session
* `tmux attach -t [Session-Name]` -> Reattach Session
* `tmux new -s Session1` -> make new session
* **Ctrl+B D** —> Detach from the current session.
* **Ctrl+B %** —> Split the window into two panes horizontally.
* **Ctrl+B "** —> Split the window into two panes vertically.
* **Ctrl+B Arrow Key** --> (Left, Right, Up, Down) — Move between panes.
* **Ctrl+B X** —> Close pane.
* **Ctrl+B C** —> Create a new window.
* **Ctrl+B N** or **P** —> Move to the next or previous window.
* **Ctrl+B 0 (1,2...)** —> Move to a specific window by number.
* **Ctrl+B :** —> Enter the command line to type commands. Tab completion is available.
* **Ctrl+B ?** — View all keybindings. Press **Q** to exit.
* **Ctrl+B W** — Open a panel to navigate across windows in multiple sessions.

> **use the mouse**

* although the mouse is disabled by default. To enable it, first enter command mode by typing **Ctrl+B :**, then toggle the mouse on (or off) with the command `set -g mouse`.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sallam.gitbook.io/sec-88/operating-systems/linux/tmux.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
