Several active tmux windows can hold similar shells, editors, log views, and monitors inside one session. Select the target window before typing so input reaches the intended workspace without detaching, changing sessions, or rearranging panes.
tmux tracks windows by a session-local index and an optional name. The default Ctrl+b then w binding opens the interactive tree, Ctrl+b followed by a number jumps to a numbered window, and select-window targets a window directly from a shell or from the tmux command prompt.
Window names do not have to be unique, so a target such as work:1 is safer than a name when automation or detached commands need an exact window. The command examples were verified with tmux 3.6 on Ubuntu 26.04; use the configured prefix instead of Ctrl+b when the session has a custom prefix.
Related: How to attach to a tmux session
Related: How to create a window in tmux
Related: How to rename a window in tmux
Related: How to select a pane in tmux
Related: How to change tmux prefix key to Ctrl-a
$ tmux list-windows -t work 0: shell* (1 panes) [80x24] [layout b25d,80x24,0,0,0] @0 (active) 1: logs (1 panes) [80x24] [layout b25e,80x24,0,0,1] @1 2: monitor (1 panes) [80x24] [layout b25f,80x24,0,0,2] @2
The number before each colon is the window index, and the asterisk marks the current window for that session.
Ctrl+b w
Move with the arrow keys, expand sessions with the right arrow when needed, and press Enter to select the highlighted window.
Related: How to attach to a tmux session
Ctrl+b 1
Replace 1 with the target window number. The default number bindings cover 0 through 9.
Ctrl+b n Ctrl+b p
Ctrl+b n runs next-window, and Ctrl+b p runs previous-window.
Ctrl+b l
The default l binding runs last-window, which toggles back to the last current window in the session.
$ tmux select-window -t work:1
The target format is session:window. In this example, work:1 means window 1 in the work session.
$ tmux list-windows -t work 0: shell- (1 panes) [80x24] [layout b25d,80x24,0,0,0] @0 1: logs* (1 panes) [80x24] [layout b25e,80x24,0,0,1] @1 (active) 2: monitor (1 panes) [80x24] [layout b25f,80x24,0,0,2] @2
The asterisk moved from shell to logs, and logs is now marked active for the work session.
$ tmux select-window -t work:monitor
Use the numeric target instead when more than one window could match the same name.