- Published on
Switch window horizontally 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 split window horizontally to produce 2 vertical panes thereby creating a new pane.
Split window horizontally to create 2 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 + %
By default the prefix is Ctrl-B
, so to split tmux window horizontally you can run the following command-
Ctrl-B + %
You can also create a pane vertically in tmux thereby making your terminal experience more productive.
I hope you found this article useful, glad that you found it easy to split window horizontally to panes in Tmux. You can also check out the complete tmux cheatsheet of keyboard shortcuts and mouse shortcuts.