Windows
Like virtual desktops, scoped to one tmux session
Windows are full-screen layouts of panes. Switch with n/p or 0โ9. Rename with comma. Close with &.
A tmux window is a full-screen layout of one or more panes. Think of it as a virtual desktop: you can have many windows in the same session, each containing different panes. Only one window is visible at a time; the others wait, with their shells running, until you switch to them.
| Keys | Action |
|---|---|
| Ctrl-Bc | Create a new window |
| Ctrl-Bn | Next window |
| Ctrl-Bp | Previous window |
| Ctrl-B0 โ Ctrl-B9 | Jump to numbered window |
| Ctrl-BL | Toggle to last-active window |
| Ctrl-Bw | Interactive window chooser (j/k, Enter) |
| Ctrl-B, | Rename current window |
| Ctrl-B& | Close current window (confirm with y) |
| Ctrl-BSpace | Cycle preset pane layouts in current window |
How Many Windows?
There's no rule, but a common pattern is one window per task: an editor window with code, a server window running the dev server, a logs window tailing whatever's relevant, a scratch window for ad-hoc shell work. When you switch tasks, switch windows. When the task is done, kill the window. The session sticks around.
Watch
See also: Panes โ Split, Navigate, Resize, Sessions, Detach, Reattach