DebugPointer
Published on

Move pane to left or right in Tmux

Move pane to left or right in Tmux

Tmux is one of the most useful tool when it comes to using using a linux terminal.

Tmux is a terminal multiplexer, it allows a user to access multiple terminals (or windows), each running a separate program, while providing a single screen to work on. Tmux is useful for running more than one command-line program at the same time, increasing productivity and the way you work.

Let's say you have already created one or more tmux sessions, with several windows and panes. We will discuss how you can move a tmux pane to left or right easily.

Move Tmux panes to different positions

Let's consider the case where you have created several panes in a window. Let's say you are inside a tmux window 'A' i.e., your cursor is active in a pane in the window you wish to switch from.

Move the current pane to left in Tmux

You can use the following keyboard shortcut to move the current pane to left inside a tmux window-

Prefix {

By default the prefix is Ctrl-B, so to move to left side window you can run the following command-

Ctrl-B + {

Move the current pane to right in Tmux

You can use the following keyboard shortcut to move the current pane to right inside a tmux window-

Prefix + }

By default the prefix is Ctrl-B, so to move to right side window you can run the following command-

Ctrl-B + }

You can also switch pane, switch window or switch session in the process while you move your panes around the window.

I hope you found this article useful, glad that you found it easy to move current pane to left or right as per your requirement inside a tmux window in Tmux. You can also check out the complete tmux cheatsheet of keyboard shortcuts and mouse shortcuts.