VS Code SetupBeginner

How to Open and Use the Integrated Terminal in VS Code

Open the built-in terminal in VS Code, run commands without leaving the editor, and manage multiple shells side by side.

6 minBeginner

When you are coding with an AI assistant you constantly switch between editing files and running commands: install a package, start a dev server, run a test. The integrated terminal in VS Code lets you do all of that inside the same window, in the same folder as your project, so you never lose context. This guide shows how to open it, run commands, and juggle more than one shell.

What you need

  • VS Code installed (any recent version)
  • A project folder open in VS Code
  • A few minutes

Step 1: Open the terminal panel

Press Ctrl+` (the backtick key, usually below Escape) on Windows and Linux, or Cmd+` on macOS. A panel opens along the bottom of the window with a shell prompt. You can also use the menu: View, then Terminal. The terminal always starts in your open project folder, so paths are relative to your code.

VS Code - integrated terminal
PROBLEMS OUTPUT DEBUG CONSOLE TERMINAL
~/projects/my-app $ ls
package.json src README.md
~/projects/my-app $ npm run dev
VITE ready in 412 ms
Local: http://localhost:5173/
The terminal panel docked at the bottom of the editor.

Step 2: Run a command

Click into the terminal and type any command, exactly as you would in a standalone terminal. Try checking your Node version, then installing dependencies for the project.

zsh - my-app
$node --version
v20.11.1
$npm install
added 312 packages in 8s
$

Step 3: Split the terminal

It is common to want one shell running a dev server and another free for git or installs. Click the split icon in the terminal toolbar, or press Ctrl+Shift+5 (Cmd+\ on macOS). The panel divides into two side-by-side shells. Click either side to focus it.

Step 4: Open more terminals

Use the plus icon in the top-right of the terminal panel to create a new terminal instance. Each one appears in a dropdown list on the right so you can name and switch between them. Closing a tab with the trash icon kills that shell.

VS Code - terminal tabs
TERMINAL + v [ ] x
----------------------------------------------
> 1: zsh (dev server)
2: zsh (git)
3: node (repl)
Multiple terminals listed on the right side of the panel.
Stop a running command
Press Ctrl+C in the focused terminal to stop whatever is running, such as a dev server. The terminal stays open for your next command.

Result

You can now open the terminal with one shortcut, run commands in your project folder, and split or add terminals so a server and your scratch commands live side by side without ever leaving the editor.

Watch related tutorials

Tags
#terminal#shell#basics#productivity