learntmux.dev

Kick out a stale client

Goal

You are the only client on home, and no client is left on learn.

A client is one terminal attached to the server. Three ways to get rid of one:

C-b D
client mode, a list of every client on the server; Enter or d detaches the selected one
attach -d -t name at C-b :
attach yourself and detach every other client on that session
detach-client -a at C-b :
detach everyone except you

Run these at C-b :, not in a pane’s shell. A pane already has $TMUX set, so tmux attach there refuses to nest.

A session can have several clients, and it is drawn at the size of the smallest one — which is why a stray client makes a session mysteriously cramped.

Do this

Press C-b D, move to one of the clients on home, press Enter.

Three clients were listed: yours on learn, two on home. The one you picked goes, and its window in learn closes with it.

Press q if the list is still open, then C-b :, type attach -d -t home, Enter.

The screen switches to home, and you are its only client.

Detaching is not moving a client

Even if you forced the nested attach through, it would only add a second client rather than move the one you are sitting at. Detaching a client changes nothing inside the session itself.

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. Only one client remains attached to session home— not done yet
  2. The learner's client has left session learn— not done yet
  3. The one remaining client is on home— not done yet