Open the terminal with a keyboard shortcut or menu
The fastest way to open a terminal in VS Code is to press Ctrl+` (backtick) on Windows or Linux, or Ctrl+` on Mac. The backtick key is usually to the left of the 1 key on your keyboard. A terminal panel will appear at the bottom of your editor window, ready for you to type commands.
If the keyboard shortcut does not work, you can open the terminal through the menu instead. Click Terminal in the top menu bar, then select New Terminal. This opens a new terminal panel in the same way.
Once the terminal is open, you can type any command your system supports — running scripts, installing packages, navigating folders, or anything else you would do in a command prompt or shell. The terminal runs in the same folder as your current VS Code project by default.
Key Takeaways
- Press Ctrl+` (backtick) to open a terminal instantly without using menus.
- The terminal opens at the bottom of VS Code and starts in your project folder.
- You can open multiple terminals by pressing Ctrl+` again or clicking the plus icon in the terminal panel.
- Switch between terminals using the dropdown menu in the terminal panel, or close one by clicking the X next to its name.
Where the terminal appears and what shell it uses
When you open a terminal, it appears as a panel at the bottom of your VS Code window. The panel takes up roughly one-third of your screen height, leaving the editor above it. You can drag the divider between the editor and terminal up or down to make the terminal larger or smaller.
The terminal uses your system's default shell. On Windows, this is usually PowerShell or Command Prompt. On Mac and Linux, it is usually Bash or Zsh. You can see which shell is running by looking at the dropdown menu in the terminal panel — it shows the active shell name next to a plus icon.
If you want to switch to a different shell, click the dropdown arrow next to the shell name and select a different option from the list. VS Code will open a new terminal using that shell instead.
Opening multiple terminals at once
You can open as many terminals as you need without closing the first one. Press Ctrl+` again to open a second terminal, or click the plus icon in the terminal panel header. Each terminal runs independently and can execute different commands at the same time.
The terminal panel shows a tab for each open terminal. Click any tab to switch between them. If you want to close a terminal without closing all of them, click the X button next to its tab name. The remaining terminals stay open.
This is useful when you need to run a server in one terminal while testing code in another, or when you want to keep one terminal's output visible while working in a second one.
Hiding and showing the terminal panel
To hide the terminal without closing it, press Ctrl+` again. The terminal panel disappears, and you get more space for your editor. Press Ctrl+` once more to bring it back — your terminal and any commands you ran are still there.
You can also click the X button in the top-right corner of the terminal panel to close it completely. This removes all open terminals. The next time you press Ctrl+` or open a new terminal through the menu, a fresh terminal will appear.
Running commands in the terminal
Once the terminal is open, click inside it and type any command your system supports. For example, you can type node script.js to run a JavaScript file, python app.py to run a Python script, or npm install to install packages listed in your project's package.json file.
Press Enter to run the command. The terminal shows the output below your command. If a command is still running, you can stop it by pressing Ctrl+C.
The terminal starts in your project's root folder by default, so you can reference files relative to that location. If you need to navigate to a different folder, use cd followed by the folder path — for example, cd src to enter a folder named src.
Changing the default terminal shell
If you want VS Code to always open a specific shell instead of your system default, you can change this in settings. Press Ctrl+, to open VS Code settings, then search for terminal.integrated.defaultProfile. You will see a list of available shells on your system.
Click the shell you want to use as your default. From now on, when you open a new terminal, it will use that shell. You can still switch to a different shell for any individual terminal by using the dropdown menu in the terminal panel.
Frequently Asked Questions
Why does the keyboard shortcut not work?
The backtick key might be mapped to a different function on your keyboard layout. Try using the menu instead: click Terminal, then New Terminal. If you want to change the keyboard shortcut, open settings (Ctrl+,), search for "terminal.integrated.toggleTerminal", and click the pencil icon to set a new shortcut.
Can I open the terminal in a different folder than my project?
Yes. Once the terminal is open, use the cd command to navigate to any folder on your system. For example, type cd /path/to/folder on Mac or Linux, or cd C:\path\to\folder on Windows. The terminal will then run commands from that location.
What if the terminal does not show output from my command?
Make sure you pressed Enter after typing the command. If the command ran but produced no output, that is normal — some commands only show results when they encounter an error. If you think the command is still running, wait a moment or press Ctrl+C to stop it.
Can I resize the terminal panel?
Yes. Drag the divider line between the editor and terminal up or down to make the terminal larger or smaller. You can also drag it all the way to the top to hide it, or drag it to the bottom edge of the window to maximize it.