I run tmux in a terminal. Then in another terminal I attach to the same session. The first terminal is smaller than the second one, this makes tmux in the second terminal not use all available rows and/or columns. Assume I cannot get to the first terminal to detach.

How to detach the first client (first terminal) using only the second terminal?

  • Your question isn't super clear, but this might help.
    – Ben N
    Jan 19, 2016 at 19:57
  • It detach tmux in tmux. I need to deatach sesion in one płace and attach in another
    – wytrzeszcz
    Jan 19, 2016 at 20:24

2 Answers 2



re-attach an attached session (detaching it from elsewhere)

tmux attach -d 


tmux attach-session -d

An alternative to what you already know.

If you attach normally and only then discover (or recall, or suspect) there is another client attached, press prefixD (capital D, so most likely prefixShift+d).

This will present you a list of attached clients. If there is only one position, then it's only you. Tmux 2.3 initially highlights the acting client, but it also presents information that may help to identify clients. Entries look like the following:

(0)  /dev/pts/0: 0 [206x58 xterm] (utf8) (last used Thu Oct 17 12:57:17 2019)
(1)  /dev/pts/2: 0 [206x46 xterm] (utf8) (last used Thu Oct 17 13:00:38 2019)

Navigate with cursor keys, choose an unwanted client and press Enter to detach it (or q or Esc to cancel).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .