Open a terminal in VS Code and you get a real system shell running inside the editor window, started at the root of whatever folder you have open. On Windows that shell is PowerShell by default. On Linux and macOS it’s whatever $SHELL points to.
Git and every other command behave the way they do in a standalone terminal. Shell integration has been on by default since version 1.70, and on supported shells it adds command decorations and command navigation.
Windows users should know about one recent change. Version 1.109 (February 4, 2026) removed winpty support from node-pty, so Windows terminals now need Windows 10 version 1809 or later. Any guide that still describes a winpty fallback is out of date.
What is the VS Code integrated terminal?
Inside the editor window sits a terminal emulator that runs a real system shell, started at the root of the workspace folder. echo, ls and git behave as they do in a standalone terminal, and the output links back to workspace files.
The panel lives inside the editor around it, so a path printed by a failed build opens the matching file with one click. That alone is a good reason to stay in it.
How the terminal runs a shell
The display side is xterm.js, a terminal front-end component written in JavaScript, and VS Code is one of its listed users. Processes come from node-pty, which provides forkpty bindings for Node.js and forks processes that hold pseudoterminal file descriptors. On Windows, node-pty goes through the Windows ConPTY API.
What actually runs inside that pty is your shell. $SHELL on Linux and macOS, PowerShell on Windows.
The shell runs with VS Code’s own permissions. For elevated rights, the Profiles docs point to tools like runas.exe inside the terminal.
What the terminal is not
It isn’t the Debug Console, and it isn’t an external terminal window either.
The Debug Console is a separate panel tied to debug sessions. It evaluates expressions while you debug and does not replace a shell. An external terminal is a window outside the editor, like Windows Terminal or macOS Terminal. Same kinds of shells, different window.
A workspace in Restricted Mode cannot open a terminal. VS Code shows a trust prompt, and canceling it leaves the window with no terminal. Workspaces: Manage Workspace Trust in the Command Palette fixes that.
There’s also a terminal.integrated.allowInUntrustedWorkspace setting that skips the prompt. The VS Code docs recommend it only when your shell is configured to prevent automatic code execution from workspace contents, so I’d leave it off for most projects.
How to open and toggle the terminal

Press Ctrl+ (Control+ on macOS) to toggle the terminal panel. The View menu, then Terminal, does the same.
Ctrl+Shift+` creates a new terminal, and the View: Toggle Terminal command covers the Command Palette route. A slower, screenshot-style version lives in this full walkthrough for opening the terminal in VS Code.
| Action | Windows and Linux | macOS |
|---|---|---|
| Toggle terminal | Ctrl+` | Control+` |
| New terminal | Ctrl+Shift+` | Control+Shift+` |
| Split terminal | Ctrl+Shift+5 | Cmd+\ |
| Find in terminal | Ctrl+F | Cmd+F |
| Previous or next command | Ctrl+Up, Ctrl+Down | Cmd+Up, Cmd+Down |
Jumping between commands only works while shell integration is active.
The VS Code workflow cheat sheet covers the same habits for the rest of the editor.
Some shortcuts never reach the shell. terminal.integrated.commandsToSkipShell lists the commands VS Code handles itself, while sendKeybindingsToShell sends most shortcuts to the shell and disables ones like Ctrl+F.
On macOS, Cmd+K clears the terminal by default, which blocks Cmd+K chords until you remove that binding.
How to change the default shell and set up terminal profiles

Run Terminal: Select Default Profile, or set terminal.integrated.defaultProfile for your platform (.windows, .osx or .linux) in settings.json. The new terminal dropdown offers the same command.
Leave it alone and you get $SHELL on Linux and macOS, PowerShell on Windows.
- Open the Command Palette and run Terminal: Select Default Profile.
- Pick one of the detected shells. VS Code finds most standard shells on its own.
- To adjust a shell, click the configure button beside it, which adds an entry to settings.json.
- If you’re editing by hand, set the default to the name of an existing profile.
- Open a new terminal and read the tab title to confirm the shell.
Settings per platform
terminal.integrated.profiles defines the profiles themselves, and terminal.integrated.defaultProfile holds the name of the one that opens by default. Tasks and debugging can get their own through terminal.integrated.automationProfile.
Older tutorials still show terminal.integrated.shell.windows. VS Code 1.56 (April 2021) deprecated terminal.integrated.shell and shellArgs in favor of profiles.
Profile properties
A profile takes either a path or, on Windows, a source plus optional args. The source key points at PowerShell or the Bash shell that ships with Git for Windows.
For manual edits, open settings.json and add the profile under terminal.integrated.profiles.
overrideName replaces the dynamic terminal title with the profile name. env sets environment variables, and a null value removes one. icon and color take an icon ID and a theme color ID.
Setting a built-in profile’s name to null removes it from the dropdown. WSL shells are auto-detected on a local Windows machine, and terminal.integrated.useWslProfiles turns that off.
Profile caveats and fixes
- Windows PowerShell isn’t listed by default when PowerShell 6 or later is installed. Pick it through Select Default Profile.
- Git Bash does not keep history across sessions by default. The docs suggest PROMPT_COMMAND=’history -a’.
- On macOS, login-shell behavior can duplicate or reorder PATH entries. Set terminal.integrated.inheritEnv to false, or set the profile args to an empty array.
- Aliases defined in login scripts may need to move to ~/.bashrc or ~/.zshrc.
My advice is to keep the shell you already use outside the editor as the default. A different shell inside VS Code means different aliases and a different PATH, and that gets confusing quickly.
How to manage multiple terminals, tabs and splits
Split a terminal with Ctrl+Shift+5 (Cmd+\ on macOS), then move between panes with Alt+Left and Alt+Right. Groups switch with Ctrl+PageDown and Ctrl+PageUp.
Tabs sit on the right side of the terminal view, and the trash icon or the Delete key closes one. You can drag tabs between groups, or run Terminal: Unsplit Terminal to give one its own group. Where a new split opens is decided by the terminal.integrated.splitCwd setting.
Terminals do not have to stay in the panel.
Terminal: Create New Terminal in Editor Area opens a terminal as an editor tab, and terminal.integrated.defaultLocation sets the default to view or editor. Dragging a terminal from the list into the editor area works too.
Tabs can also move between VS Code windows by dragging, or through the Detach Session and Attach to Session commands.
Persistent sessions restore terminals after a reload. terminal.integrated.persistentSessionScrollback controls how much scrollback comes back.
When a long job has to outlive the editor, tmux is the usual answer. The VS Code docs list sub-shells among the cases that need a manual shell integration install, so test decorations inside tmux before you rely on them.
What does shell integration add to the terminal?
Once shell integration is running, VS Code can see where each command starts and ends and which exit code it returned. That knowledge powers decorations, command navigation, sticky scroll and quick fixes.
It left preview in version 1.69 (June 2022), and automatic injection became the default in 1.70.
Decorations mark each command as a success or failure, show exit codes, and offer rerun and copy-output actions. Navigation between commands uses Ctrl or Cmd with Up and Down, and adding Shift selects from the current position to that command. Sticky scroll pins the partially visible command at the top of the terminal. Quick fixes suggest things like killing a process that holds a port or setting a git upstream.
Run recent command sits on Ctrl+Alt+R by default. Go to recent directory is Cmd+G, or Ctrl+G on Windows and Linux.
Sticky scroll got a filter in 1.109. Per the February 4, 2026 release notes, terminal.integrated.stickyScroll.ignoredCommands excludes chosen commands, and it skips agentic CLIs such as copilot, claude, codex and gemini by default.
Activation and supported shells
Supported shells are bash, fish, pwsh and zsh on Linux and macOS, plus Git Bash and pwsh on Windows.
Shells launched from VS Code get the script automatically, and setting terminal.integrated.shellIntegration.enabled to false turns that off.
Manual install is needed for sub-shells, plain ssh sessions without Remote – SSH, and complex shell setups. A line in the startup file sources the script from code –locate-shell-integration-path followed by the shell name.
Hovering over the terminal tab shows the quality level. A rich level means command detection works as intended. Basic is more limited, and exit status is one of the things that can go missing.
When shell integration fails
| Symptom | Likely cause | Fix |
|---|---|---|
| No integration in PowerShell on Windows | Execution policy blocks the script | Set RemoteSigned for the current user |
| No integration in zsh | Oh My Zsh interference | Point ZDOTDIR at a minimal config through terminal.integrated.env.osx |
| Injection fails in bash | Unsupported $PROMPT_COMMAND format | Assign a single function to it |
| Nothing in an older fish | The $XDG_DATA_DIRS injection method is not supported | Install the script manually |
The zsh workaround comes from Cline’s troubleshooting guide, which reports Oh My Zsh interference with shell integration. The official docs never name Oh My Zsh. They do say some shell plugins can disable integration by unsetting $VSCODE_SHELL_INTEGRATION.
On Windows, ConPTY can misplace decorations after commands run, and VS Code applies heuristics to correct them. If decorations appear even though the feature is off, another terminal integration is installed. Setting decorationsEnabled to never hides them.
Which terminal settings are worth changing?

Most defaults hold up, so change a setting only when something specific looks or behaves wrong. GPU rendering and scrollback come up most, with the contrast ratio close behind.
All of them live in the regular settings editor, and a broader guide to VS Code settings shows where the rest of the editor options sit.
Appearance and rendering
The DOM renderer is much slower than WebGL, but it has better compatibility.
terminal.integrated.gpuAcceleration defaults to auto, which tries the WebGL renderer and falls back to the DOM renderer if WebGL fails. On Linux VMs or machines with outdated drivers, the failure shows up as a multicolored triangle or a black rectangle. Launching with –disable-gpu or setting gpuAcceleration to off gets around it.
Ligatures need font support. If VS Code cannot parse the font, you may have to turn GPU acceleration off or define fallback ligature sequences.
Scrollback keeps 1000 lines by default, set by terminal.integrated.scrollback. The minimumContrastRatio setting adjusts text luminance until a 4.5:1 ratio is met, and a value of 1 turns it off. fontFamily takes a CSS font-family string such as ‘Fira Code’, monospace, where the second entry is the fallback.
Colored text can lose some saturation under the contrast rule, so set it to 1 if colors look washed out.
Working directory and environment
terminal.integrated.cwd sets a fixed starting folder, and leaving it empty keeps the workspace root. terminal.integrated.env is a map of environment variables applied to every profile, configured per platform. terminal.integrated.detectLocale takes on, auto or off and controls how $LANG is set.
Multiple VS Code instances share environment variables, and the –user-data-dir flag isolates them.
Extensions can contribute environment variables too. Affected terminals relaunch if that is safe, or show a warning with a relaunch button.
Leave cwd alone unless a project really needs a fixed start folder. The workspace root is the right default for most repositories.
How to run code and tasks from the terminal
Terminal: Run Selected Text in Active Terminal sends the selection to the active terminal, and it runs the current line if nothing is selected. The docs list no default shortcut, so bind one in keybindings.json if you use it often.
Terminal: Run Active File in Active Terminal does the same for a whole file. The Python side of that workflow has its own write-up on running Python in VS Code.
Tasks in the terminal
Tasks run in the integrated terminal, and the presentation property controls how that panel behaves.
| panel value | Behavior | Fits |
|---|---|---|
| shared | All runs of any task write to the same terminal | Short scripts |
| dedicated | Each task gets its own terminal, reused on the next run | Dev servers, watchers |
| new | Every run opens a new, clean terminal | Builds with noisy output |
A problem matcher scans task output and reports warnings and errors inline and in the Problems panel. It only parses output from its own command, so reading a log file means the command has to print that file.
Task support works only in a workspace folder, not with single files.
Tasks run as non-login, non-interactive shells, so startup scripts such as nvm may not load and the task fails with “command not found”. The recommended fix is to put the command on your PATH. Passing -l through the shell args in options.shell also works, but the docs do not recommend it.
A DEV Community write-up shows the same failure in practice. A pnpm task ends with zsh reporting command not found, and the terminal process fails to launch with exit code 127.
terminal.integrated.automationProfile sets the shell used for all automation, tasks included, and options.shell overrides it per task, globally or per platform. Reach for those before touching your default profile.
Debugging with the terminal
The Debug Console and the terminal are separate panels, and launch.json decides which one your program talks to.
The console attribute accepts internalConsole, integratedTerminal and externalTerminal, and the docs point to integratedTerminal when the application needs interactive standard input.
Redirect operators in args usually do not redirect input or output. Start the app by hand in a terminal and attach the debugger instead.
Python projects add one more variable, since the virtual environment active in that terminal decides which interpreter runs. A short guide to activating a venv in VS Code covers that part.
How does the terminal behave in WSL, SSH and dev containers?
Once a folder is open in a remote window, a terminal opened from VS Code runs on the remote side. That means inside WSL, on the SSH host or inside the container, and not on your local machine.
So a working local shell does not rule out a problem in WSL, an SSH host or a container, per the VS Code launch troubleshooting page.
Profiles behave differently there as well. The Advanced page notes that remote windows can launch only the default local profile, not non-default ones.
Terminals in WSL
Open the folder by running code . from a WSL terminal in that folder, or use WSL: Connect to WSL from the F1 menu. The code . command needs the Add to PATH option from the installer, and a restarted terminal if it still fails.
No shell startup scripts run in the WSL remote environment, so server environment changes go in ~/.vscode-server/server-env-setup. An invalid setup script can stop the server from starting. If that happens, delete or rename it from a regular WSL shell and check WSL: Show Log.
Terminals over Remote – SSH
Terminal sessions run on the remote host, so they use that host’s shell and environment. The full Remote – SSH setup guide covers keys and config files.
Linux hosts must be glibc-based, so Alpine and other non-glibc distributions are not supported. Bash, tar, and curl or wget must be present on the host. The docs require 1 GB RAM on the host and recommend at least 2 GB and a 2-core CPU.
High latency makes the terminal feel slow. Turning off terminal.integrated.enableFileLinks removes link verification, which the docs name as a fix in high latency remote environments.
Terminals in dev containers
Once a folder is open in a container, terminals opened from VS Code run inside the container, not on the host. Docker is the prerequisite, and the workspace opens inside a Docker container that supplies the shell and tools.
With a passphrase-protected key, pull and sync can hang when running remotely. Use a key without a passphrase, clone over HTTPS, or run git push from the command line.
An ssh-agent 8.8 or earlier paired with a client 8.9 or later causes Permission denied (publickey) on Windows, and upgrading OpenSSH to 8.9 or later fixes it.
All folders in a multi-root workspace open in the same container.
When does an external terminal make more sense?
Use an external terminal when a session has to outlive the editor window, or when the integrated terminal’s rendering limits get in the way. For anything tied to the workspace, the integrated terminal stays the better tool.
Where each option wins
| Criterion | Integrated terminal | External terminal | tmux |
|---|---|---|---|
| Session lifetime | Tied to the VS Code window | Independent of VS Code | Persistent, survives disconnection and detaching |
| Editor links | Output links to workspace files | None | Depends on the host terminal |
| Rendering | xterm.js, with documented limits | The app’s own renderer | The host terminal’s renderer |
An external terminal opens with the workbench.action.terminal.openNativeConsole command. On Windows, terminal.external.windowsExec picks the app, for example wt.exe for Windows Terminal.
The handoff works in reverse too. From any shell, you can launch VS Code from the terminal with the code command.
tmux sessions survive accidental disconnection or intentional detaching and can be reattached with tmux attach, which is the reason to pick it over a plain window for long jobs.
Documented rendering limits
- Sixel and iTerm inline images work only with terminal.integrated.enableImages on, are not restored on reload, and animated GIFs do not work.
- Multi-character emoji such as skin-tone variants may not render correctly, and emoji support is limited on Windows.
- Ambiguous-width symbols depend on terminal.integrated.unicodeVersion (6 or 11), which should match the shell or OS.
- ConPTY can reprint the screen, so old content may reappear after Terminal: Clear.
Workspace-bound commands, task output and anything that needs file links or shell integration features belong in the integrated terminal. Overnight jobs and image-heavy output go to an external terminal, as does anything that has to survive closing the editor.
How to fix the “terminal process failed to launch” error
Test the same shell outside VS Code first. If it fails there, investigate the shell or the operating system. If it works, continue with startup customization and shell integration.
The Pty Host log records shell process creation and communication, and it should be captured at Trace level alongside the Terminal frontend log after reproducing the failure.
| Error | First fix |
|---|---|
| Shell executable path does not exist | Check the shell profile and select an installed shell |
| Starting directory does not exist | Check the working directory named in the error, including task, extension and split-terminal settings |
| Native exception during launch | On Windows, read the detail, such as access denied, invalid directory or policy block |
| Terminal repeatedly restarts | Isolate shell integration in a new terminal and capture trace logs |
| WSL exits with code 1 | Check the WSL distribution |
Isolate startup customization
- From an external terminal, start the shell without startup files, using pwsh -NoProfile, powershell.exe -NoProfile, bash –noprofile –norc, zsh -f or cmd.exe /d.
- If that works, inspect your usual startup files for the failing command, and back them up before editing.
- Create a temporary terminal profile with the same executable and options in its args array.
- Select the temporary profile from the terminal dropdown to confirm the result.
- Remove the diagnostic profile when you finish.
A shell that starts but cannot find a command usually points to PATH, the same root cause behind errors such as pip not being recognized in VS Code.
Exit codes and native errors
Exit code 259 alone does not identify the failing component. The docs warn against terminating unrelated processes based only on the code.
Native Windows errors are separate from exit codes. Error 5 means access denied, 267 an invalid starting directory and 1260 a software restriction policy. The value 3221225786 (0xC000013A) is Ctrl+C termination and is not proof of a launch failure.
For exit code 1 under WSL, run wsl –status and wsl –list –verbose, then test an interactive distribution (not docker-desktop-data) with wsl –distribution followed by its name. Exit codes 127 and 2 are not covered by the official page.
Winpty removal and what the sources say
Since VS Code 1.109 (February 4, 2026), winpty support is removed from node-pty, and the minimum is Windows 10 version 1809. The node-pty README confirms ConPTY as the Windows backend and lists winpty as removed.
The Advanced page still tells a different story. It describes ConPTY on Windows 10 build 18309 and later, a winpty fallback on older versions, and a windowsEnableConpty setting the page advises against disabling. The release notes and the node-pty README are the newer sources, so treat the fallback text as outdated.
The windowsUseConptyDll setting also changed role. The 1.109 notes call it an experimental workaround, while the current troubleshooting page says it selects the ConPTY library shipped with VS Code, defaults to true, and should be returned to the default if you changed it.
It does not fix every case. A GitHub report on version 1.120 shows “cannot launch conpty” even after trying windowsUseConptyDll, other default shells, Administrator mode and sfc /scannow. The thread records no maintainer response or resolution.
Compatibility mode can also interfere with terminal process creation. Clear “Run this program in compatibility mode” in the Compatibility tab of the VS Code executable’s Properties.
VS Code Integrated Terminal FAQ
How do I copy and paste in the terminal on Linux?
Ctrl+Shift+C copies and Ctrl+Shift+V pastes, and Shift+Insert pastes the current selection. Windows uses Ctrl+C and Ctrl+V, macOS uses Cmd+C and Cmd+V.
The terminal.integrated.copyOnSelection setting copies text the moment you select it.
Which command clears the terminal?
Terminal: Clear in the Command Palette clears the output, and on macOS Cmd+K does the same by default. Typing clear (or cls in Command Prompt) inside the shell also works.
How do I open a terminal in a specific folder?
Right-click the folder in the Explorer and choose Open in Integrated Terminal. Skip that step and a new terminal starts at the workspace root.
Can I open a terminal in a new VS Code window?
Yes. Press Ctrl+Shift+Alt+` on Windows or Linux and the terminal opens in a new window.
The docs list a few different ways to do this, and the shortcut is the quickest.
Do links in terminal output open files?
Yes. File links open in an editor, and folder links open a new VS Code window at the folder. URI links such as https addresses open in the system browser.
Word links are the fallback type, and terminal.integrated.wordSeparators defines where a word ends.
Is there a way to maximize the terminal panel?
Yes. Run View: Toggle Maximized Panel from the Command Palette to give the terminal the full height of the editor area.
Run the same command again to restore the previous layout.
What to Change First in the VS Code Integrated Terminal
Start with the default profile, then hover over the terminal tab and check that shell integration reports rich quality. Rendering, scrollback and contrast defaults can stay untouched until a specific symptom appears.
After that comes automationProfile, which gives tasks and debugging a shell of their own. The order follows dependency. The shell choice decides PATH and aliases, and everything after it inherits from that choice.
Tasks run as non-login, non-interactive shells, while aliases usually live in interactive startup files, so an alias that works at the prompt can be missing from a task. Put tool locations on PATH instead.
Verified against the VS Code docs on November 20, 2026. Recheck the Windows requirements after any release that touches node-pty.
Once the shell is settled, a compact Bash cheat sheet covers the commands worth running in it.
- Outsourcing Medical Device Software Securely - November 28, 2026
- How to Install Playwright in VS Code and Run Your First Test - November 27, 2026
- Top 10 Supply Chain Software Development Companies in 2026 – Best Partners for WMS and TMS Projects - November 27, 2026



