How do you zoom a tmux pane to full screen?
Ctrl + B, Z — Zoom pane
Ctrl + B then Z toggles zoom on the active pane so it fills the whole window. Press the same sequence again to restore the previous pane layout.
Related tmux shortcuts: Panes
| Shortcut | Action | Notes |
|---|---|---|
| Ctrl + B, % | Split left and right | Split the current pane into two, left and right. |
| Ctrl + B, " | Split top and bottom | Split the current pane into two, top and bottom. |
| Ctrl + B, X | Kill pane | Kill the current pane. |
| Ctrl + B, O | Next pane | Select the next pane in the current window. |
| Ctrl + B, ; | Last pane | Move to the previously active pane. |
| Ctrl + B, ↑/↓/←/→ | Select pane by direction | Change to the pane above, below, to the left, or to the right of the current pane. |
| Ctrl + B, Q | Show pane numbers | Briefly display pane indexes; press a number to jump to that pane. |
| Ctrl + B, Z | Zoom pane | Toggle zoom state of the current pane (fullscreen within the window). |
| Ctrl + B, { | Swap with previous pane | Swap the current pane with the previous pane. |
| Ctrl + B, } | Swap with next pane | Swap the current pane with the next pane. |
| Ctrl + B, Ctrl + O | Rotate panes forwards | Rotate the panes in the current window forwards. |
| Ctrl + B, Alt + O | Rotate panes backwards | Rotate the panes in the current window backwards. |
| Ctrl + B, ! | Break pane to window | Break the current pane out of the window into its own window. |
| Ctrl + B, M | Mark pane | Mark the current pane, used as the default source for join and swap. |
| Ctrl + B, Shift + M | Clear marked pane | Clear the marked pane (uppercase M). |
| Ctrl + B, Space | Next layout | Arrange the current window in the next preset layout. |
| Ctrl + B, Alt + 1-7 | Preset layouts | Arrange panes in one of the seven preset layouts: even-horizontal, even-vertical, main-horizontal, main-horizontal-mirrored, main-vertical, main-vertical-mirrored, or tiled. |
From the tmux reference (73 entries) · all how-to answers
What zoom does
Zoom hides the other panes and gives the active one the whole window; the layout is remembered and restored when you toggle it off. A Z appears in the window name in the status bar while zoomed, which explains the "where did my other panes go" moment. Keys sent to the window still go to the zoomed pane only, and switching panes with Ctrl + B, arrows unzooms automatically.
Alternatives
Ctrl + B, ! breaks the active pane out into its own window permanently, which is the choice when a split has outgrown the screen for good; join-pane from the command prompt puts it back. Ctrl + B, Space cycles through preset layouts, and Ctrl + B, Ctrl + arrows resize a pane a cell at a time (Ctrl + B, Alt + arrows in larger steps) when zooming is too much and the default sizes too little.
Mouse and configuration
With set -g mouse on in ~/.tmux.conf, pane borders can be dragged to resize and a double-click on a border zooms in some configurations. Many people bind zoom to something shorter than the two-key sequence — bind -n M-z resize-pane -Z gives Alt + Z without the prefix.
Checking whether a pane is zoomed
A zoomed pane is easy to forget when the status bar is hidden: tmux display -p "#{window_zoomed_flag}" prints 1 when the current window is zoomed, which is useful in scripts, and the pane border shows no other panes at all. If a new pane seems to appear inside the zoomed one, tmux unzoomed to make room — toggle again once the split is arranged.