Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

People also ask

How do you merge panes in tmux?

Merge Windows You can use the join-pane command. There is no keyboard shortcut, so you have to enter the Tmux command mode. Then you have to tell Tmux the target window. Now you can type <prefix> j while you're in the target window.

How do you move between the two must used tmux panes for the current tmux window?

Tmux uses the keybinding 'Prefix' followed by 'Ctrl+o' to cycle around the panes.

How do I move a pane from one window to another in tmux?

Key binding By default, Ctrl + b , ! would break the active pane into a new window and switch to it. Where Ctrl + b is the default prefix for tmux.

How do I close a split window in tmux?

Once you type "exit" or Ctrl-d in the last remaining pane, tmux will close. You can also exit tmux by pressing : to go to the bottom bar of the tmux window. Then type kill-session.


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