learntmux.dev

Tag and kill from the tree

Goal

learn keeps only shell and logs, and is the only session left.

Tree mode can act on many items at once. Five keys, none needing a prefix:

t
tag or untag the selected item; tagged lines go bold with a *
T / C-t
clear every tag / tag everything listed
X
kill every tagged item, after one confirmation
x
kill only the selected item, whatever is tagged
:
a prompt that runs your command once per tagged item

X picks its command from the level you tagged: kill-window for windows, kill-pane for panes. There is no key for kill-session, which is why sessions go through the : prompt instead.

Do this

Press C-b w, move to scratch1 and press t, then move to scratch2 and press t.

Both lines turn bold.

Press X, then y.

Both windows close; shell and logs remain.

Press C-b s, then tag junk1 and junk2 with t.

Do not tag learn — killing the session you are attached to detaches you.

Press :, type kill-session, Enter.

Both sessions close and you stay on learn.

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 0 of learn is shell and window 1 is logs, scratch1 and scratch2 are gone— not done yet
  2. Only the session learn remains on the server— not done yet