learntmux.dev

Change the current window

Goal

Window 0 is current and window 3 is the last window.

Three ways to change window, all of them select-window with a different target:

C-b 0 … C-b 9
jump to a window by index
C-b n / C-b p
step to the next or previous window
C-b l
the last window, meaning the one that was current before this one

The status line marks the current window with * and the last window with -. The last window updates on every switch, so it is one step of history, not a stack — which is why C-b l twice brings you home.

Do this

Press C-b 3.

tests is current: 3:tests*.

Press C-b n, then C-b p.

To docs and back to tests.

Press C-b 0.

editor is current, and 3:tests- marks the last window.

Press C-b l twice.

First to tests, then back to editor, with tests last again.

The other ways to target a window

Each of these is one command with a different target: an index, the next or previous window, or the remembered last one. select-window -t 3 at the prompt does exactly what C-b 3 does.

Stuck on this one?

This is a live terminal. Typing goes to the machine, including Tab. Press Shift and Tab together to move focus back out to the page.

A real terminal, in this tab

about 15 MB, once

session learn

Done when

not started
  1. Window 3 becomes the current window of session learn— not done yet
  2. Window 0 is current and window 3 is the last window— not done yet