To split a tmux pane horizontally (creating a pane below), press Ctrl+b
followed by "
(double quote). You can also use the command tmux split-window
.
Splitting panes is one of tmux's most powerful features, allowing you to view multiple terminal sessions side by side. A horizontal split creates a new pane below the current one, stacking them vertically.
tmux's terminology can be confusing: a "horizontal split" creates a horizontal line dividing panes vertically (one above the other). This is why some users prefer to use the term "split horizontally" to mean "create a horizontal divider."
Ctrl+b "
- Split current pane horizontally (create pane below)Ctrl+b %
- Split current pane vertically (create pane to the right)Ctrl+b :
then type split-window
- Split horizontallyCtrl+b :
then type splitw
- Shorthand for split-windowtmux split-window -t session:window.pane
- Split specific pane horizontallysplit-window -h
- Split vertically (side by side)split-window -v
- Split horizontally (explicit)split-window -p 25
- New pane takes 25% of spacesplit-window -c "~/projects"
- Set starting directorysplit-window "top"
- Run command in new pane 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 -c "#{pane_current_path}" bind % split-window -h -c "#{pane_current_path}"