Currently reading through this guide to get a good start on understanding tmux
. However, I am confused about a particular aspect of tmux
.In the section Session Handling, there seems to be a mention saying that:
To detach your current session use
C-b d
. You can also useC-b D
to have tmux give you a choice which of your sessions you want to detach. This will detach your session but will leave you’re doing in that session running in the background.
Now I tried out both options. C-b d
seems to work perfectly fine but it seems like C-b D
just gives me an option of one session to dettach (no matter how many sessions are running). In which case, the question arises: What is the point of having a C-b d
and a C-b D
?
The text you have referenced is wrong! The author was confused by tmux's session and client. Default prefix+d will detach current tmux client, not session! Read tmux man page, there is a section that explains clients and sessions.
If you want to play with it:
tmux new-session -s "foo"
tmux attach
prefix+D
, tmux will ask you which client you want to detach.