learntmux.dev

Kill the server

Goal

The tmux server is gone; tmux ls reports no server.

kill-server, typed at C-b :, stops the whole server at once: every session, window and pane, attached or not, with no confirmation.

Normally things close from the inside out, one layer at a time:

  1. a program exits → its pane closes
  2. the last pane in a window closes → the window closes
  3. the last window in a session closes → the session ends
  4. the last session ends → the server stops

exit in a shell starts that chain and nothing else. kill-server skips it entirely and does not care what is still running.

Do this

Run tmux ls.

Two sessions: learn with two windows and scratch with one.

Type exit.

This pane’s shell ends and window shell closes. learn still has logs, so you stay attached, now looking at it.

Press C-b :, type kill-server, Enter.

You are back at the plain shell, and tmux ls reports no server.

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. The tmux server has been killed; tmux ls reports no server running— not done yet