0

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?

wytrzeszcz
  • 31
  • 2

2 Answers2

2

http://www.dayid.org/comp/tm.html

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

tmux attach -d 

OR

tmux attach-session -d
wytrzeszcz
  • 31
  • 2
0

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).