A split tmux window can make an editor, log view, or command output hard to read when each pane has only a small part of the terminal. Zooming temporarily expands the active pane to fill the window while the other panes stay alive and hidden behind it.
The default zoom binding is C-b z when the prefix is still C-b. It runs resize-pane -Z, which toggles the active pane between the full-window zoomed view and its original place in the layout.
A zoomed window shows the tmux zoom flag, and the same state can be checked with window_zoomed_flag. The command examples were verified with tmux 3.6 on Ubuntu 26.04; commands that resize, split, swap, or otherwise change pane positions can unzoom the window automatically.
Related: How to resize panes in tmux
Steps to zoom a pane in tmux:
- Confirm the current window contains at least two panes before using zoom.
Need another pane first: How to split a pane horizontally in tmux or How to split a pane vertically in tmux.
- Show pane numbers when the pane that should fill the window is not active.
C-b q
The zoom command affects the active pane.
Related: How to select a pane in tmux
- Press the target pane number before the overlay closes.
1
Replace 1 with the pane number shown by tmux.
- Press the default zoom binding.
C-b z
The pane expands to fill the tmux window. The other panes are hidden from view but their programs keep running.
- Open the tmux command prompt when the shortcut is inconvenient or the prefix has been customized.
C-b : resize-pane -Z
The command-prompt form toggles zoom for the active pane, just like the default C-b z binding.
Related: How to use the tmux command prompt
- Run resize-pane -Z from a normal shell when automation needs an explicit pane target.
$ tmux resize-pane -Z -t zoomdemo:0.0
Replace zoomdemo:0.0 with the target pane. The format is session:window.pane, so this example means pane 0 in window 0 of session zoomdemo.
- Confirm the window is zoomed with display-message.
$ tmux display-message -p -t zoomdemo:0 '#{window_panes} panes zoomed=#{window_zoomed_flag}' 2 panes zoomed=1The zoomed=1 field confirms that one pane is filling the window while the window still has two panes.
- Toggle zoom again to restore the original pane layout.
C-b z
Running resize-pane -Z a second time performs the same unzoom action.
- Confirm the layout has returned to the unzoomed state.
$ tmux display-message -p -t zoomdemo:0 '#{window_panes} panes zoomed=#{window_zoomed_flag}' 2 panes zoomed=0The zoomed=0 field confirms that tmux returned to the normal split-pane layout.
Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.