brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: tmux join-pane moves a pane from another window into this one

Tmux
~/tips/tip-tmux-join-pane

tmux join-pane -s 2 # take window 2 and put it into this window

Pulls a pane out of another window and places it next to the pane you are in.

break-pane turns a pane into its own window. join-pane does the opposite.

tmux join-pane -s 2        # take window 2 and put it into this window
tmux join-pane -h -s 2     # same, but side by side

-s names the source window or pane. The pane becomes part of the window you are in. Without -h the two panes are stacked, with -h they sit side by side.

The program in the pane keeps running through the move. If the source window had only that one pane, the window disappears afterwards.

Run tmux list-windows first to see the numbers, or press Ctrl-b : and type the command in the tmux prompt, which saves you leaving the session.

Try it without risk: start a throwaway session with tmux new -s scratch, use the shortcut or command above there, look at what changes, and close it again with tmux kill-session -t scratch. Nothing else on your machine is touched.

Further reading: tmux manual page (OpenBSD, official), tmux wiki: Getting Started (official)

More Tmux tips tmux new -d -s report -x 200 -y 50 'top' tmux wait-for build-done set -g allow-passthrough on tmux kill-server Ctrl-b [ All Tmux tips (125) All topics

Link