The integrated terminal in VS Code runs a full shell inside the editor window. You do not need to switch to a separate terminal application to run commands. It opens at the root of your workspace and supports PowerShell, Command Prompt, Git Bash, zsh, bash, fish, and any other shell installed on your machine.
Once you are comfortable with the basics, learn how to /vscode/how-to-change-the-default-terminal-in-vs-code and /vscode/how-to-split-terminals-and-run-multiple-terminals-in-vs-code.
Open the terminal
There are four ways to open the integrated terminal:
| Method | Action |
|---|---|
| Keyboard shortcut | Press Ctrl+` (Windows/Linux) or Cmd+` (macOS). This toggles the terminal panel open and closed. |
| Menu bar | Select Terminal > New Terminal. |
| Command Palette | Press Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (macOS), type View: Toggle Terminal, and press Enter. |
| Explorer context menu | Right-click any folder in the File Explorer and select Open in Integrated Terminal. |
The terminal opens as a panel at the bottom of the window. If no workspace folder is open, it starts in your home directory.
If the terminal panel does not appear, the workspace might be in Restricted Mode. Check the status bar for a "Restricted Mode" indicator. You can trust the workspace to enable the terminal, or learn more about Workspace Trust and Restricted Mode.
Create and manage terminal instances
You can run multiple terminal sessions at the same time. Each session appears as a tab on the right side of the terminal panel.
Create a new terminal instance
Click the + button in the top-right corner of the terminal panel, or press Ctrl+Shift+` (Windows/Linux) or Cmd+Shift+` (macOS).
Switch between terminals
Click any tab to bring that terminal to the front. The active terminal tab is highlighted. You can also use the profile dropdown next to the + button to launch a terminal with a specific shell.
Close a terminal
Hover over the tab and click the Trash Can icon, or select the tab and press Delete. You can also run the Terminal: Kill the Active Terminal Instance command from the Command Palette.
Terminal tabs can be reordered by dragging them. You can also drag a tab into the editor area to turn it into a terminal editor that sits alongside your code files.
Run commands and see output
Type any shell command and press Enter. The terminal runs it just like a standalone terminal application. Some things to know:
- The working directory starts at your workspace root. Change it with cd like normal.
- Output scrolls up into the scrollback buffer. The buffer keeps 1000 lines by default, controlled by the
terminal.integrated.scrollbacksetting. Scroll with your mouse wheel, trackpad, or the scroll bar.
To run a file or selection from the editor without copying it manually: select text in an editor, open the Command Palette, and run Terminal: Run Selected Text in Active Terminal. If nothing is selected, the entire line where your cursor sits is sent to the terminal.
Use the terminal find tool
Press Ctrl+F (Windows/Linux) or Cmd+F (macOS) while the terminal is focused to open the find widget. Type your search term and matches are highlighted inline in the terminal buffer. Use Enter and Shift+Enter to jump between matches, just like find in the editor.
If you need Ctrl+F to reach the shell instead (for example, in a terminal-based text editor), remove workbench.action.terminal.focusFind from the terminal.integrated.commandsToSkipShell setting.
Copy, paste, and select text
Copy and paste shortcuts follow your platform conventions:
| Platform | Copy | Paste |
|---|---|---|
| Windows | Ctrl+C | Ctrl+V |
| macOS | Cmd+C | Cmd+V |
| Linux | Ctrl+Shift+C | Ctrl+Shift+V (or Shift+Insert) |
You can also enable copy on selection: open Settings, search for terminal.integrated.copyOnSelection, and check the box. Any text you highlight in the terminal will be copied automatically.
To select all text in the terminal, use Cmd+A on macOS or run the Terminal: Select All command on Windows and Linux.
Navigate the terminal buffer
| Action | Windows | macOS | Linux |
|---|---|---|---|
| Scroll up one line | Ctrl+Alt+PageUp | Cmd+Option+PageUp | Ctrl+Shift+Up |
| Scroll down one line | Ctrl+Alt+PageDown | Cmd+Option+PageDown | Ctrl+Shift+Down |
| Scroll up one page | Shift+PageUp | PageUp | Shift+PageUp |
| Scroll down one page | Shift+PageDown | PageDown | Shift+PageDown |
| Jump to top | Ctrl+Home | Cmd+Home | Shift+Home |
| Jump to bottom | Ctrl+End | Cmd+End | Shift+End |
Clickable links and file paths
The terminal detects URLs, file paths, and folder paths automatically. Hover over any link to see an underline, then hold Ctrl (Windows/Linux) or Cmd (macOS) and click it. URLs open in your browser. File paths like src/app.ts:10:5 open the file at the specified line and column.
You can also drag a file from the Explorer into the terminal to paste its escaped path at the cursor.
Maximize the terminal temporarily
When you need to focus entirely on terminal output, click the Maximize Panel Size chevron button in the top-right of the terminal panel, or run View: Toggle Maximized Panel from the Command Palette. This hides the editor area and expands the terminal to fill the window. Click the button again to restore the editor.
The Maximize Panel Size button only appears when the panel alignment is set to Center (the default). If you do not see it, right-click the panel's title bar and confirm the alignment option is set to Center.
Use Copilot in the terminal
If you have GitHub Copilot, you can get AI help directly in the terminal without leaving the command line.
Press Ctrl+I (Windows/Linux) or Cmd+I (macOS) while the terminal is focused to open Terminal Inline Chat. Type a natural-language request and Copilot suggests a command.
Select Run to execute it immediately or Insert to add it to the terminal for editing before running.
You can also use the @terminal chat participant in the Chat view to ask about shell commands and scripting. Learn more about setting up GitHub Copilot Free.
What to do if the terminal does not work
If the terminal fails to open, try these checks in order.
Check for shortcut conflicts
Run Developer: Toggle Keyboard Shortcuts Troubleshooting from the Command Palette to identify a conflicting shortcut.
Clear a stuck terminal
If the panel shows an error, run Terminal: Clear to reset the buffer.
Fix rendering glitches
For a blank area or visual glitches, set terminal.integrated.gpuAcceleration to off. This falls back to DOM rendering.
Check for a macOS startup ding
A ding sound on startup usually means a shell profile script printed unexpected output. Check ~/.zshrc or ~/.bash_profile for stray echo commands.
Rune AI
Key Insights
- Open the terminal with Ctrl+
(Cmd+on macOS) or Terminal > New Terminal. - Create new terminal instances with the + button or Ctrl+Shift+`.
- Switch between tabs by clicking them or using the terminal dropdown.
- Use Ctrl+F (Cmd+F) to find text inside the terminal buffer.
- Use Terminal: Run Selected Text in Active Terminal to execute editor selections.
- Try Copilot inline chat with Ctrl+I (Cmd+I) when the terminal is focused.
Frequently Asked Questions
How do I open the terminal if the keyboard shortcut does not work?
Can I run multiple terminal instances at once?
How do I copy and paste in the VS Code terminal?
Conclusion
The integrated terminal lets you run shell commands without switching windows. Open it with Ctrl+`, create as many terminals as you need, and use find, copy, paste, and Copilot inline chat to stay productive without leaving the editor.
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.