Tag and kill from the tree
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.
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.
Here is what just happened.
Tagging then X ran one confirmed kill-window over the whole batch instead of two C-b & prompts. The : prompt inside tree mode differs from C-b :: with tags set, the command runs once per tagged item, each as its target.
- Tagged items show bold with a *t
- Kill every tagged session, window or pane after confirmingX
- Run a command such as kill-session on every tagged item:
Go further
C-tthen untagging one item withtis the fast way to keep only that one.- The confirmation before
Xis the sameconfirm-beforebehindC-b &andC-b x.
- 1Do not tag
learnitself: killing the session you are attached to detaches you. - 2In the tree,
ttags the selected item,Xkills every tagged item after a confirmation.:runs a command once per tagged item. - 3
C-b w: tagscratch1andscratch2witht, pressX,y. ThenC-b s: tagjunk1andjunk2, press:, typekill-session, Enter.
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
Alpine Linux and tmux 3.4 on an x86 emulator. Nothing to install, and no server behind it.
about 15 MB, once
Done when
not started- Window 0 of learn is shell and window 1 is logs, scratch1 and scratch2 are gone— not done yet
- Only the session learn remains on the server— not done yet