Terminal

How to Split Terminal on Mac: Shortcuts for Every App

Nemo · · 5 min read

To split the terminal on a Mac into two shells side by side, use a terminal app with panes: in iTerm2, Ghostty and Warp, Cmd+D splits right and Shift+Cmd+D splits down. In any terminal, including Apple’s, tmux splits with Ctrl+b % (left and right) or Ctrl+b “ (top and bottom). Apple’s Terminal has a Split Pane command (Cmd+D) too, but it shows a second view of the same shell, not a second shell.

If you’ve pressed Cmd+D in Terminal and seen your typing appear twice, that’s why. The next section explains it.

Why doesn’t Terminal’s Split Pane give you a second shell?

You press Cmd+D in Terminal, the window splits, you type in the bottom half and the same text shows up in the top half. That’s by design. Terminal’s Window > Split Pane splits the view of one session, so you can scroll back through earlier output in one half while the other half follows the live prompt. Both halves are the same shell.

It’s useful for reading a long build log while it runs. It does nothing for the usual reason to split: a dev server in one pane and a prompt in the other. Shift+Cmd+D closes the split.

For two real shells in Terminal, you have two options: open a second tab (Cmd+T) or window (Cmd+N), or run tmux inside it.

What are the split shortcuts in each Mac terminal?

App Split right Split down Move between panes Zoom a pane
Terminal (Apple) Cmd+D (same shell, second view)
iTerm2 Cmd+D Shift+Cmd+D Option+Cmd+arrows Shift+Cmd+Return
Ghostty Cmd+D Shift+Cmd+D Option+Cmd+arrows Shift+Cmd+Return
Warp Cmd+D Shift+Cmd+D Option+Cmd+arrows
tmux (in any terminal) Ctrl+b % Ctrl+b “ Ctrl+b arrow Ctrl+b z
Monok Cmd+D Shift+Cmd+D Option+Cmd+arrows Shift+Cmd+Return

These are the defaults. Every app on the list lets you change them, so check its keyboard settings if one doesn’t respond. To close a pane, type exit or press Cmd+W in the app splits, or Ctrl+b x in tmux.

“Split right” puts the new pane beside the current one, which some apps call a vertical split. “Split down” puts it below, a horizontal split. The naming trips people up, so go by where the new pane appears.

How do you split panes with tmux?

tmux works in Apple’s Terminal and in every other app, which makes it the one method that’s the same everywhere. Install it with Homebrew and start it:

brew install tmux
tmux

Then press Ctrl+b, let go, and press % for a pane on the right or ” for one below. Ctrl+b and an arrow key moves between panes, and Ctrl+b z zooms the current one to fill the window.

The bigger reason to use tmux is sessions: your shells keep running after you close the window, and you attach to them again later. Our tmux Mac setup guide covers a short .tmux.conf with mouse support and splits that open in the current folder. The tmux cheat sheet lists the rest of the keys.

Which way of splitting should you pick?

You want Pick
Read old output while a command runs Terminal’s Split Pane
Two or more shells in one window, with no setup iTerm2, Ghostty or Warp
The same panes on every Mac and over SSH tmux
Shells that survive closing the window tmux
A shell next to the web page you’re working on A browser with terminal panes

If you’re choosing a terminal app in the first place, the best terminal for Mac compares them, and iTerm2 vs Terminal covers the most common switch.

Can you split a terminal next to a web page?

Split terminals solve half of a web developer’s loop. The other half is a browser in another window, and every Cmd+Tab between them breaks your focus a little.

Monok is a small Mac browser where a pane can be a web page or a native terminal running your own login shell. Ctrl+` splits a terminal in below the page. From there the same keys as iTerm2 work: Cmd+D splits right, Shift+Cmd+D splits down, Option+Cmd+arrows move the focus and Shift+Cmd+Return zooms a pane. Cmd+click a localhost link in the output and it opens in a tab. Layouts come back with the session, though a terminal comes back as an empty pane, so run tmux inside it if you need shells that keep running. More in a browser with a built-in terminal.

Next step

Open your terminal, press Cmd+D, and check what you get: a second view of the same shell or a new one. If it’s the first, install tmux or switch apps with the table above. If you want those panes next to your pages, download Monok.

FAQ

How do I split the screen in Mac Terminal?

Choose Window > Split Pane or press Cmd+D. It splits the window into two views of the same shell, which is good for scrolling back through output. For two separate shells, open a new tab or run tmux.

How do I split Terminal vertically on Mac?

In iTerm2, Ghostty and Warp, Cmd+D puts a new pane to the right, side by side. In tmux, press Ctrl+b then %.

How do I split Terminal horizontally on Mac?

In iTerm2, Ghostty and Warp, press Shift+Cmd+D for a new pane below. In tmux, press Ctrl+b then “.

How do I close a split pane in Terminal?

In Apple’s Terminal, press Shift+Cmd+D or choose Window > Close Split Pane. In apps with real panes, type exit in the pane or press Cmd+W. In tmux, press Ctrl+b then x.

How do I switch between split panes?

Option+Cmd and an arrow key moves the focus in iTerm2, Ghostty and Warp. In tmux, press Ctrl+b then the arrow key. Clicking a pane works in all of them.

Can I split two different Mac apps side by side?

Yes, with macOS’s own window tiling rather than a terminal shortcut. Mac split screen shows how.

More in Terminal

Contact

Bug reports, sites you want to see working, ideas. We reply by email.