Published on

# Switch panes 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 switch to other tmux panes.

# Switch Tmux Panes

Let's consider the case where you are inside your tmux pane i.e., your cursor is active in a pane.

You can use the following keyboard shortcut to switch to another pane-

Prefix + ArrowKey


By default the prefix is Ctrl-B, so to switch tmux panes you can run the following command-

Ctrl-B + ArrowKey


## Switch to right pane

If you want to switch to the right pane, you can use the following keyboard shortcut-

Prefix + RightArrow (→)


or

Ctrl-B + RightArrow (→)


## Switch to left pane

If you want to switch to the left pane, you can use the following keyboard shortcut-

Prefix + LeftArrow (←)


or

Ctrl-B + LeftArrow (←)


## Switch to up/above pane

If you want to switch to the top or above pane, you can use the following keyboard shortcut-

Prefix + UpArrow (↑)


or

Ctrl-B + UpArrow (↑)


## Switch to down/below pane

If you want to switch to the left pane, you can use the following keyboard shortcut-

Prefix + DownArrow (↓)


or

Ctrl-B + DownArrow (↓)


You can also switch session, switch window or move panes to left or right to organize the way you want.

I hope you found this article useful, glad that you found it easy to switch active panes in Tmux. You can also check out the complete tmux cheatsheet of keyboard shortcuts and mouse shortcuts.