How to split panes vertically in tmux?

Quick Answer

To split a tmux pane vertically (creating a pane to the right), press Ctrl+b followed by % (percent sign). You can also use the command tmux split-window -h.

Ctrl+b+%

Detailed Explanation

Splitting panes vertically in tmux creates side-by-side terminal views, allowing you to work on multiple tasks simultaneously within the same window. This is one of tmux's most powerful features for multitasking.

Note on Terminology

tmux's terminology can be confusing: a "vertical split" creates a vertical line dividing panes horizontally (side by side). This is why some users prefer to use the term "split vertically" to mean "create a vertical divider."

Using keyboard shortcuts:

  • Ctrl+b % - Split current pane vertically (create pane to the right)
  • Ctrl+b " - Split current pane horizontally (create pane below)

Using tmux commands:

  • Ctrl+b : then type split-window -h - Split vertically
  • Ctrl+b : then type splitw -h - Shorthand for split-window -h

From the command line (outside tmux):

  • tmux split-window -h -t session:window.pane - Split specific pane vertically

Useful options:

  • split-window -h -p 25 - New pane takes 25% of space
  • split-window -h -b - Create pane to the left instead of right
  • split-window -h -c "~/projects" - Set starting directory
  • split-window -h "htop" - Run command in new pane

Pro Tip

Create a custom key binding for splitting windows while staying in the same directory by adding these lines to your ~/.tmux.conf:

bind % split-window -h -c "#{pane_current_path}"
bind '"' split-window -c "#{pane_current_path}"

Layout Management

After creating multiple panes, you can cycle through preset layouts with Ctrl+b Space, or select specific layouts with Ctrl+b Alt+1 through Ctrl+b Alt+5.