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

# Panes

An open command prompt (known as “pseudo-terminal”), which may occupy the entire screen or appear horizontally/vertically stacked.

| **Command**                                                                                                                | **Description**                                                                                                                                                                                                                                                                                                                                                        |
| -------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Ctrl + B` -> `q`                                                                                                          | <p>Show pane numbers:<br><br><a href="https://www.stationx.net/wp-content/uploads/2022/10/Numbered-panes-in-Tmux.png"><img src="https://cdn.shortpixel.ai/spai/q_lossless+w_150+to_webp+ret_img/www.stationx.net/wp-content/uploads/2022/10/Numbered-panes-in-Tmux.png" alt="Numbered panes in Tmux"></a></p>                                                          |
| `Ctrl + B` -> `q` `0` … `9`                                                                                                | Switch to pane by number                                                                                                                                                                                                                                                                                                                                               |
| `Ctrl + B` -> o                                                                                                            | Go to next pane                                                                                                                                                                                                                                                                                                                                                        |
| `Ctrl + B` -> `z`                                                                                                          | Zoom in/out of pane                                                                                                                                                                                                                                                                                                                                                    |
| `Ctrl + B` -> `!`                                                                                                          | Convert pane into new window                                                                                                                                                                                                                                                                                                                                           |
| `Ctrl + B` -> `%`                                                                                                          | Split vertically                                                                                                                                                                                                                                                                                                                                                       |
| `Ctrl + B` -> `"`                                                                                                          | Split horizontally                                                                                                                                                                                                                                                                                                                                                     |
| `Ctrl + B` -> `→`                                                                                                          | Switch to right pane                                                                                                                                                                                                                                                                                                                                                   |
| `Ctrl + B` -> `←`                                                                                                          | Switch to left pane                                                                                                                                                                                                                                                                                                                                                    |
| `Ctrl + B` -> `↑`                                                                                                          | Switch to upper pane                                                                                                                                                                                                                                                                                                                                                   |
| `Ctrl + B` -> `↓`                                                                                                          | Switch to lower pane                                                                                                                                                                                                                                                                                                                                                   |
| `Ctrl + B` -> `;`                                                                                                          | Toggle last active pane                                                                                                                                                                                                                                                                                                                                                |
| `Ctrl + B` -> `[spacebar]`                                                                                                 | Toggle between pane layouts                                                                                                                                                                                                                                                                                                                                            |
| `Ctrl + B` -> `{`                                                                                                          | Move current pane leftward                                                                                                                                                                                                                                                                                                                                             |
| `Ctrl + B` -> `}`                                                                                                          | Move current pane rightward                                                                                                                                                                                                                                                                                                                                            |
| `Ctrl + B` -> `x`                                                                                                          | Kill / Close current pane                                                                                                                                                                                                                                                                                                                                              |
| `:setw synchronize-panes`                                                                                                  | <p>Toggle synchronize-panes (the ability to send the same command to all panes at once)<br><br><a href="https://www.stationx.net/wp-content/uploads/2022/10/Synchronize-panes.png"><img src="https://cdn.shortpixel.ai/spai/q_lossless+w_150+to_webp+ret_img/www.stationx.net/wp-content/uploads/2022/10/Synchronize-panes.png" alt="Synchronize panes"></a></p>       |
| `:resize-pane -L 5`                                                                                                        | <p>Move the boundary of the pane leftwards by 5 lines.<br>Direction flags:<br>-U upwards<br>-D downwards<br>-L leftwards<br>-R rightwards</p>                                                                                                                                                                                                                          |
| <p><strong>M #</strong><br><strong>M:</strong> meta key; ALT for Linux, ESC for macOS<strong>#: 1, 2, 3, 4, 5</strong></p> | <p>Splitting panes in a designated form:<br>#=1: uniform vertical split<br>#=2: uniform horizontal split<br>#=3: horizontal split, main pane on top, others on bottom, vertically split, all same width<br>#=4: vertical split, main pane left, others right, horizontally split, all same height<br>#=5: tile, new panes on bottom, same height before same width</p> |
