learntmux.dev

Rename the session and a window

Goal

Session 0 is named project and its window 0 is named editor.

One key per level:

C-b $
rename the session
C-b ,
rename the current window

Both open a prompt with the old name already in it. Clear it with C-u first, then type the new name and press Enter.

Windows are renamed automatically after the program running in them, which is why a new window is sh and becomes top when you run top. Naming a window yourself — with -n or C-b , — switches that off for that window, and the name sticks.

Do this

Press C-b $, then C-u, type project, Enter.

The prompt opened showing 0; the status line now reads [project].

Press C-b ,, then C-u, type editor, Enter.

The prompt opened showing sh; the list now reads 0:editor*.

A name is only a label

A name is only a label. The window keeps its index and is still addressed by index, and two windows may even share a name.

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. Session 0 has been renamed to project— not done yet
  2. Window 0 of session project has been renamed to editor— not done yet