tmux: How to join two tmux windows into one, as panes?

RNA picture RNA · Mar 6, 2012 · Viewed 36.9k times · Source

I have two tmux windows, with a single pane in each, and I would like to join these two panes together into a single window as a horizontal split panes. How could I do that?

Answer

RNA picture RNA · Mar 7, 2012

Actually I found the way to do that. Suppose the two windows are number 1 and 2. Use

join-pane -s 2 -t 1 

This will move the 2nd window as a pane to the 1st window. The opposite command is break-pane