VS Code: Integrated Terminal
Complete guide to the VS Code integrated terminal, split terminals, multiple shell profiles (Zsh, Bash, PowerShell, WSL), and shell integration.
VS Code includes an integrated terminal that runs directly at the root of your workspace, allowing you to run dev servers, Git commands, and build scripts without switching application windows.
Terminal Shortcuts
- Toggle Terminal: Ctrl + `
- Create New Terminal Tab: Ctrl + Shift + `
- Split Terminal (Side-by-Side): Cmd + </kbd> (macOS) / Ctrl + Shift + 5 (Win/Linux)
- Switch Between Active Terminal Tabs: Cmd + Option + ↑/↓ (macOS) / Alt + ↑/↓ (Win/Linux)
Configuring Default Shell Profiles
You can configure VS Code to launch Zsh on macOS, Bash or Fish on Linux, and PowerShell or WSL2 on Windows.
In settings.json:
{
// macOS default
"terminal.integrated.defaultProfile.osx": "zsh",
// Linux default
"terminal.integrated.defaultProfile.linux": "bash",
// Windows default (WSL or PowerShell)
"terminal.integrated.defaultProfile.windows": "PowerShell",
// Shell Profiles
"terminal.integrated.profiles.windows": {
"PowerShell": {
"source": "PowerShell",
"icon": "terminal-powershell"
},
"Ubuntu (WSL)": {
"path": "wsl.exe",
"args": ["-d", "Ubuntu"]
},
"Git Bash": {
"path": "C:\\Program Files\\Git\\bin\\bash.exe"
}
}
}Shell Integration Features
VS Code terminal includes rich shell integration:
- Command decorations: Blue circle next to successful commands; red circle next to failed commands.
- Run Recent Command: Press Cmd/Ctrl + Shift + P $\rightarrow$
Terminal: Run Recent Commandto search historical commands interactively. - Scroll to Previous Command: Cmd/Ctrl + ↑/↓ jumps directly between command prompts.
Related Guides
VS Code: Command Palette & Quick Open
Complete guide to using the Command Palette (>), Quick Open (Ctrl/Cmd+P), symbol search (@), and file navigation in VS Code.
VS Code: Extensions & Workspace Recommendations
Complete guide to managing VS Code extensions, workspace recommendations (.vscode/extensions.json), disabling extensions per workspace, and extension performance.