tmux Sessions, Windows, and Panes/Attach and detach other clients

Take over a session from other attached clients.

Section: Session lifecycle

Attach and detach other clients

bash
bash
tmux attach-session -d -t work
Explanation

Handy when reconnecting from a new machine.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Session lifecycle
Attach to the most recent session
Reconnect to the last session.
OpenIn sheetbashsame section
Attach to a named session
Reconnect to a specific session.
OpenIn sheetbashsame section
Start tmux
Start a new unnamed session.
OpenIn sheetbashsame section
Create a named session
Start a new session with an explicit name.
OpenIn sheetbashsame section
Create a named session and first window
Name the session and initial window together.
OpenIn sheetbashsame section
List sessions
Show existing sessions.
OpenIn sheetbashsame section