How to zoom a tmux pane to fullscreen?

By Romain Dorgueil

Short answer

tmux resize-pane -Z   # toggle the active pane to fullscreen and back

From the keyboard, prefix z runs resize-pane -Z. The active pane fills the whole window so you get room to read; prefix z again restores the previous split.

Details

Zoom is a temporary toggle, not a rearrangement. The other panes are hidden, not closed, and every process keeps running in the background. Press prefix z once to focus on one pane, press it again to get your layout back exactly as it was.

While a pane is zoomed, window_zoomed_flag is 1 and the status line shows a Z flag next to the window name, so you can tell at a glance that other panes are hidden. Anything that changes the layout unzooms the window for you: splitting or swapping panes drops you back to the full layout automatically. Switching to another window does not; the pane is still zoomed when you come back.

If you bounce between panes a lot, last-pane -Z keeps the destination pane zoomed across the toggle, and select-pane with -Z does the same when moving by direction.

Verified on tmux 3.2a.

Related