VS Code lets you split a terminal into side-by-side panes, forming a terminal group. You can run a dev server in one pane while using another for git commands, or monitor logs on the left while typing commands on the right.
If you have not used the integrated terminal yet, start with /vscode/how-to-open-and-use-the-integrated-terminal-in-vs-code. Each split pane can run a different shell; set that up with /vscode/how-to-create-and-configure-terminal-profiles-in-vs-code.
Split a terminal
There are three ways to split a terminal:
| Method | How to do it |
|---|---|
| Keyboard shortcut | With the terminal focused, press Ctrl+Shift+5 (Windows/Linux) or Cmd+\ (macOS). |
| Inline split button | Hover over a terminal entry in the tab list on the right. Click the split icon that appears. |
| Right-click menu | Right-click a terminal tab and select Split. |
| Alt+click | Hold Alt (Windows/Linux) or Option (macOS) and click the + button or any terminal tab. |
Each split creates a new terminal instance in the same group. The new pane appears to the right of the current one. Both terminals run independently: you can type in either one without affecting the other.
Navigate between split panes
Once you have two or more panes, you can move focus between them.
| Action | Windows/Linux | macOS |
|---|---|---|
| Focus next pane | Alt+Right | Cmd+Option+Right |
| Focus previous pane | Alt+Left | Cmd+Option+Left |
Clicking inside a pane also focuses it. The focused pane is highlighted.
If you prefer to use the keyboard to cycle through terminal groups (not just panes within the same group), use Ctrl+PageDown and Ctrl+PageUp (macOS: Cmd+Shift+] and Cmd+Shift+[).
Control the working directory of split terminals
By default, the working directory for a split terminal depends on your platform and configuration.
| Platform | Default behavior |
|---|---|
| macOS and Linux | The split terminal inherits the parent terminal's current working directory. |
| Windows | The split terminal starts from the directory the parent terminal was opened in, not its current directory. |
You can override this with the terminal.integrated.splitCwd setting:
{
"terminal.integrated.splitCwd": "workspaceRoot"
}Available values:
"inherited": Use the parent terminal's current working directory (macOS/Linux default)."initial": Use the parent terminal's initial working directory (Windows default)."workspaceRoot": Always open at the workspace root folder.
Manage terminal groups
A group is any collection of split terminals that share the same tab entry.
Rearrange tabs: Drag any terminal tab in the list to reorder it. Drag a tab into the main terminal area to move it from one group into another.
Resize panes: Drag the border between split panes to resize them.
Unsplit a terminal: Right-click a terminal tab and select Unsplit Terminal, or run the Terminal: Unsplit Terminal command. The terminal moves out of the group into its own tab.
Close a pane: Select the pane and press Delete (Windows/Linux) or Cmd+Backspace (macOS, with Delete also bound as a secondary shortcut), or hover over its tab entry and click the Trash Can. Closing a pane in a group does not close the other panes.
Open terminals in the editor area
Terminal groups also work in the editor area. This is useful when you want terminals next to your code instead of below it.
To move a terminal to the editor area, drag its tab from the terminal panel into the editor area. You can also run the Terminal: Create New Terminal in Editor Area command from the Command Palette.
In the editor area, you can split and arrange terminal editors just like regular editor tabs. For example, you could have a file editor on the left, a terminal on the right, and a terminal below. Each editor area terminal supports its own splits and groups.
Resize panes and the macOS ding sound
On macOS, the default shortcuts for resizing split terminal panes (Cmd+Ctrl+Left, Right, Up, and Down) can trigger a system "invalid key" ding sound. This is a long-standing Chromium and Electron limitation, not a VS Code bug, and it is harmless but distracting.
The simplest fix is to change the resize shortcuts inside VS Code instead of the mouse-drag method described above. Open the Command Palette and run Preferences: Open Keyboard Shortcuts, search for workbench.action.terminal.resizePane, and assign a different key combination to each direction.
Some online fixes suggest creating a ~/Library/KeyBindings/DefaultKeyBinding.dict file to silence the sound. That file applies system-wide to every macOS application, not just VS Code, so it is not a VS Code-scoped fix. Prefer rebinding the shortcuts in VS Code first, and only edit system-wide key bindings if you understand that broader effect.
Rune AI
Key Insights
- Split a terminal with Ctrl+Shift+5 (Cmd+\ on macOS) or the inline split button.
- Alt+click the + button or a terminal tab to split without using the keyboard.
- Navigate between split panes with Alt+Left (Ctrl+Option+Left on macOS) and Alt+Right.
- Drag terminal tabs between groups to reorganize your layout.
- Use Unsplit Terminal to move a terminal out of a group and back into its own tab.
Frequently Asked Questions
How do I unsplit a terminal and move it back to its own tab?
Can I split the same terminal more than twice?
Why does the split terminal open in a different directory?
Conclusion
Split terminals let you watch logs in one pane while running commands in another, all inside the same VS Code window. Split with Ctrl+Shift+5, navigate panes with Alt+Left and Alt+Right, and unsplit when you are done.
More in this topic
How to Use VS Code with WSL 2 on Windows
Run VS Code connected to Windows Subsystem for Linux so you can develop in a full Linux environment with native tools, terminals, and debugging, all from Windows.
20 Best VS Code Extensions for Web Developers in 2026
Twenty carefully chosen VS Code extensions every web developer should know. Covers formatting, linting, frameworks, debugging, Git, and developer experience.
How to Install, Disable, Update, and Uninstall VS Code Extensions
Learn how to install, disable, update, and uninstall VS Code extensions from the Marketplace and the command line. Step-by-step instructions for every action.