How to open the terminal in VS Code: shortcuts and default shell

Press Ctrl+` (Control+` on a Mac) or choose Terminal > New Terminal. Change the shell with Terminal: Select Default Profile.

Read time
11 min
Word count
1.6K
Sections
8
FAQs
8
Share
Developer typing at a desk with a monitor and laptop, beside text reading Open the VS Code terminal and a VS Code logo
On this page · 8 sections
  1. Quick reference: VS Code terminal shortcuts
  2. Four ways to open the terminal
  3. How to change the default terminal shell
  4. How to split the terminal and run several at once
  5. Terminal won't open or behaves oddly: fixes
  6. For IT and engineering teams
  7. How eCorpIT can help
  8. References

Summary. To open the terminal in VS Code, press Ctrl and the backtick key on Windows and Linux, or Control and backtick on a Mac, or choose Terminal > New Terminal from the menu bar. The shortcut shows or hides the terminal panel, and adding Shift (Ctrl+Shift+Backtick, or Control+Shift+Backtick on a Mac) creates another terminal. The Mac shortcut uses Control, not Command. To split the terminal, press Ctrl+Shift+5, or Cmd+\ on a Mac. VS Code starts the shell your system uses by default: PowerShell on Windows, and the shell in your $SHELL variable on macOS and Linux, which is zsh for Mac accounts created on macOS 10.15 or later. To change it, run Terminal: Select Default Profile from the Command Palette and pick a shell. The terminal opens in the folder shown in the Explorer and keeps 1,000 lines of scrollback by default. If the folder is in Restricted Mode, VS Code asks you to trust it first; cancel that prompt and no terminal opens. These steps match VS Code 1.146, the stable release of 11 November 2026.

About this article. For developers, students and IT teams who use Visual Studio Code on Windows, macOS or Linux. We checked every shortcut, menu path, command and setting on 15 November 2026 against Microsoft's VS Code documentation, release notes and enterprise policy reference, and Apple's support page on the default Mac shell. Shortcuts are the defaults for a US English keyboard and can be changed; VS Code ships stable releases about once a week, so labels can move. Researched with AI assistance and reviewed by our editorial team.

Quick reference: VS Code terminal shortcuts

This guide writes the backtick key as Backtick. These are the defaults Microsoft documents for the integrated terminal.

Action Windows and Linux Mac
Show or hide the terminal panel Ctrl+Backtick Control+Backtick
Create a new terminal Ctrl+Shift+Backtick Control+Shift+Backtick
Split the active terminal Ctrl+Shift+5 Cmd+\
Previous or next pane in a split Alt+Left / Alt+Right Option+Cmd+Left / Option+Cmd+Right
Previous or next terminal group Ctrl+PageUp / Ctrl+PageDown Shift+Cmd+[ / Shift+Cmd+]
Open a terminal in a new window Ctrl+Shift+Alt+Backtick Control+Shift+Option+Backtick
Open an external system terminal Ctrl+Shift+C Shift+Cmd+C
Find text in the terminal Ctrl+F Cmd+F
Jump to the previous or next command Ctrl+Up / Ctrl+Down Cmd+Up / Cmd+Down
Open the Command Palette Ctrl+Shift+P Shift+Cmd+P

Copy and paste follow each platform: Ctrl+C and Ctrl+V on Windows, Cmd+C and Cmd+V on a Mac, and Ctrl+Shift+C and Ctrl+Shift+V on Linux, where Shift+Insert pastes the selection. If you are new to all of this, our software developer roadmap covers the wider toolset.

Four ways to open the terminal

  1. Keyboard. Press Ctrl+Backtick (Control+Backtick on a Mac) to show or hide the panel, or Ctrl+Shift+Backtick (Control+Shift+Backtick) to create a new terminal.
  1. Menu bar. Choose Terminal > New Terminal, or View > Terminal.
  1. Command Palette. Press Ctrl+Shift+P (Shift+Cmd+P on a Mac) and run View: Toggle Terminal.
  1. From a folder. In the Explorer, right-click a folder and choose Open in Integrated Terminal to start the terminal there.

By default the terminal opens at the folder open in the Explorer. To start somewhere else every time, set terminal.integrated.cwd to a path in your settings. Open in Integrated Terminal has no default shortcut, but you can bind one to the openInTerminal command.

On a UK or other non-US keyboard

VS Code shows every shortcut in your current keyboard layout, so the key it expects may not be labelled with a backtick. If Ctrl+Backtick does nothing, run Preferences: Open Keyboard Shortcuts (Ctrl+K Ctrl+S, or Cmd+K Cmd+S on a Mac), search for toggle terminal and record the keys you want. To bind the physical key whatever the layout, use a scan code in keybindings.json:


            { "key": "ctrl+[Backquote]", "command": "workbench.action.terminal.toggleTerminal" }
          

On Linux, VS Code reads the layout at startup, so restart it after switching layouts.

How to change the default terminal shell

  1. Open the Command Palette with Ctrl+Shift+P (Shift+Cmd+P on a Mac).
  1. Run Terminal: Select Default Profile. The same list sits in the dropdown next to the + button in the terminal panel.
  1. Choose a shell. The list depends on what is installed, for example PowerShell, Command Prompt, Git Bash and WSL distributions on Windows, or bash and zsh on a Mac or Linux.

New terminals then use that shell. Terminals already running keep their old shell, so close them (the trash can on the tab) and open a new one.

Setting it in settings.json. The choice is stored per platform, and each value must match the name of a profile VS Code knows:


            {
  "terminal.integrated.defaultProfile.windows": "Git Bash",
  "terminal.integrated.defaultProfile.osx": "zsh",
  "terminal.integrated.defaultProfile.linux": "bash"
}
          

Creating a custom profile. A profile pairs a shell path or source with optional args, env, an icon and a colour. This example from Microsoft's docs adds PowerShell without its profile script and makes it the default:


            {
  "terminal.integrated.profiles.windows": {
    "my-pwsh": {
      "source": "PowerShell",
      "args": ["-NoProfile"]
    }
  },
  "terminal.integrated.defaultProfile.windows": "my-pwsh"
}
          

source works only on Windows, where it can find PowerShell or Git Bash for you. Elsewhere, use path with the shell's executable. Guides written before VS Code 1.56 (April 2021) tell you to edit terminal.integrated.shell.windows; profiles replaced that setting, which is deprecated.

Windows notes:

  • Windows PowerShell missing from the list? When PowerShell 6 or later is installed, VS Code leaves the older Windows PowerShell out. Select it through Select Default Profile to add it back.
  • Git Bash forgets history. Add export PROMPT_COMMAND='history -a' to ~/.bashrc or ~/.bash_profile.
  • Too many WSL entries. Turn off terminal.integrated.useWslProfiles and define only the distributions you use.
  • Shell missing or flagged as unsafe. VS Code hides shells installed in paths other users can write to until you add them through Select Default Profile, which shows a warning first. MSYS2 in C:\msys64 is one example.

A plainer shell for tasks and debugging. If your default shell has a slow or non-POSIX startup, set terminal.integrated.automationProfile.<platform> so tasks and debug sessions use something like /bin/sh.

How to split the terminal and run several at once

To split the active terminal into side-by-side panes, do any of these:

  • Press Ctrl+Shift+5 (Windows, Linux) or Cmd+\ (Mac).
  • Hold Alt and click the + button or a terminal tab.
  • Right-click a terminal tab and choose Split, or hover over a tab and select its inline split button.

Move between panes with Alt+Left and Alt+Right (Option+Cmd+Left and Option+Cmd+Right on a Mac). To pull a pane back into its own group, run Terminal: Unsplit Terminal.

Which folder does a split start in? On Windows, a split starts in the folder where the parent terminal started. On macOS and Linux it inherits the parent's current folder. Set terminal.integrated.splitCwd to workspaceRoot to always start at the workspace root.

Other layouts:

  • Terminal as an editor tab. Run Terminal: Create New Terminal in Editor Area, or change terminal.integrated.defaultLocation so new terminals open in the editor area.
  • Separate window. Press Ctrl+Shift+Alt+Backtick (Control+Shift+Option+Backtick on a Mac), or right-click a tab and choose Move Terminal to New Window.
  • Bigger panel. Use the maximise panel button with the upward chevron. It works only when the panel alignment is set to Center.

To close a terminal, hover its tab and select the trash can, select the tab and press Delete, or run Terminal: Kill the Active Terminal Instance.

Terminal won't open or behaves oddly: fixes

The fixes below come from Microsoft's terminal, Workspace Trust, keyboard and appearance documentation.

Problem Likely cause Fix
A trust prompt appears and no terminal opens Folder is in Restricted Mode Trust the folder if you trust its contents, then open the terminal
Ctrl+Backtick types a character or does nothing Keyboard layout or a conflicting shortcut Rebind View: Toggle Terminal, or run Developer: Toggle Keyboard Shortcuts Troubleshooting
New terminals still open the old shell Running terminals keep their shell Close them and open a new terminal
Need an administrator shell The terminal runs with VS Code's permissions Use a platform tool such as runas.exe inside the terminal
PATH duplicated or reordered on a Mac A login shell runs twice Set terminal.integrated.inheritEnv to false, or use a profile with empty args
Garbled text or a coloured triangle GPU rendering problem Set terminal.integrated.gpuAcceleration to off
Terminal closes at launch with an exit code Shell path, start folder or startup script Follow the error message through the terminal launch troubleshooting guide

The troubleshooting guide matches each error message to a cause, such as a shell path that does not exist or a start folder that was moved.

For IT and engineering teams

  • Keep Workspace Trust on. VS Code blocks the terminal in Restricted Mode because shells can run code from a workspace, for example by sourcing .env files. Restricted Mode also disables or limits AI agents, tasks, debugging and extensions until someone trusts the folder. The terminal.integrated.allowInUntrustedWorkspace setting removes the prompt; the docs tie it to shells set up not to run workspace code.
  • There is no policy for the default shell. The enterprise policy reference has no terminal profile entry. Set shells through your device images, or commit a .vscode/tasks.json that opens the terminals a project needs. Tasks set to run on folder open still need each developer to allow automatic tasks once, and never run in an untrusted workspace.
  • Control AI agents in the terminal. The ChatToolsTerminalEnableAutoApprove policy (VS Code 1.104 and later) decides whether commands run through the agent terminal tool can be auto-approved. CopilotCliCommand (1.143 and later) decides whether VS Code puts the copilot command on PATH and in integrated terminals. Our guides to Copilot browser tools controls and AI coding agent harnesses cover the wider agent settings.
  • Deploying policies. Run Developer: Policy Diagnostics on a test machine to confirm what is enforced. Windows uses ADMX templates (from 1.69), macOS uses .mobileconfig profiles (from 1.99) and Linux reads /etc/vscode/policy.json (from 1.106).
  • Do not run VS Code as administrator. Every integrated terminal inherits VS Code's permissions, so raise rights only for the commands that need them.

How eCorpIT can help

eCorpIT is a Gurugram-based technology organisation, founded in 2021, assessed at CMMI Level 5 and MSME certified, with senior-led engineering teams working across AWS, Microsoft and Google platforms. Our application development services team can set up shared developer environments, VS Code settings and CI pipelines so new engineers start work quickly. Talk to us at /contact-us/.

Last updated: 15 November 2026.

References

  1. Terminal Basics — Visual Studio Code documentation (Microsoft)
  1. Terminal Profiles — Visual Studio Code documentation (Microsoft)
  1. Use zsh as the default shell on Mac — Apple Support
  1. Workspace Trust — Visual Studio Code documentation (Microsoft)
  1. Visual Studio Code 1.146 release notes, 11 November 2026 — Visual Studio Code (Microsoft)
  1. Default keyboard shortcuts reference — Visual Studio Code documentation (Microsoft)
  1. Keyboard shortcuts for Visual Studio Code — Visual Studio Code documentation (Microsoft)
  1. Getting started with the terminal — Visual Studio Code documentation (Microsoft)
  1. April 2021 (version 1.56) release notes — Visual Studio Code (Microsoft)
  1. Terminal Appearance — Visual Studio Code documentation (Microsoft)
  1. Troubleshoot terminal launch failures and unexpected exits — Visual Studio Code documentation (Microsoft)
  1. Centrally manage VS Code settings with policies — Visual Studio Code documentation (Microsoft)
  1. Integrate with External Tools via Tasks — Visual Studio Code documentation (Microsoft)

Frequently asked

Quick answers.

01 What is the shortcut to open the terminal in VS Code?
On Windows and Linux, press Ctrl and the backtick key, which sits left of 1 on a US keyboard. On a Mac, press Control and backtick, not Command. The shortcut shows or hides the terminal panel. To create an extra terminal, add Shift: Ctrl, Shift and backtick, or Control, Shift and backtick on a Mac.
02 How do I open the terminal in VS Code on a Mac?
Press Control and the backtick key, or choose Terminal, then New Terminal, from the menu bar. You can also open the Command Palette with Shift, Command and P and run View: Toggle Terminal. To split the terminal on a Mac, press Command and backslash. VS Code starts the shell set in your SHELL variable, usually zsh.
03 How do I change the default terminal in VS Code?
Open the Command Palette with Ctrl, Shift and P, or Shift, Command and P on a Mac, and run Terminal: Select Default Profile. Pick the shell you want, such as PowerShell, Command Prompt, Git Bash, WSL, bash or zsh. New terminals use it from then on; close any open terminals that still run the old shell.
04 Which shell does the VS Code terminal use by default?
On Windows the default is PowerShell. On macOS and Linux, VS Code uses the shell named in your SHELL environment variable. Macs have used zsh as the default shell for new user accounts since macOS 10.15 Catalina. VS Code also detects other installed shells, which you can pick from the dropdown next to the plus button.
05 How do I split the terminal in VS Code?
Press Ctrl, Shift and 5 on Windows and Linux, or Command and backslash on a Mac. You can also hold Alt and click the plus button, or right-click a terminal tab and choose Split. Move between panes with Alt and the left or right arrow, or Option, Command and the arrow keys on a Mac.
06 Why won't the terminal open in VS Code?
The most common reason is Restricted Mode. VS Code blocks the terminal in folders you have not trusted and asks you to trust the folder first; if you cancel, no terminal opens. Other causes include a non-US keyboard layout, a conflicting shortcut, or a shell that fails at launch, which Microsoft's troubleshooting guide covers.
07 How do I open the VS Code terminal in a specific folder?
Right-click the folder in the Explorer and choose Open in Integrated Terminal. The new terminal starts in that folder instead of the workspace root. To change the starting folder for every terminal, set terminal.integrated.cwd in your settings, and use terminal.integrated.splitCwd to control where split terminals start.
08 How do I run the VS Code terminal as administrator?
The integrated terminal runs with the same permissions as VS Code itself. For a command that needs administrator or other rights, Microsoft's docs suggest a platform tool such as runas.exe inside the terminal. On a Mac or Linux, use sudo for the individual commands that need it rather than running all of VS Code elevated.

About the author

Manu Shukla

Founder & Director

Founder of eCorpIT. Hands-on engineer leading senior-only delivery for AI apps, custom software, and cloud systems for global clients.

Subscribe

One engineering note a week. No fluff, no spam.

Senior-architect playbooks on AI agents, mobile apps, cloud, security, data, and marketing — delivered every Wednesday.

Past the reading

Read enough. Let's build something.

A senior architect responds in 24 working hours with scope, indicative cost, and a timeline. NDA before any technical conversation.

Loading search…

Browse all guides