Text of code.visualstudio.com › docs › terminal › basics as Styx crawled it on Oct 9, 2026. The page may have changed since. Only its words are kept, without pictures or layout, and only the first part of a long page.

Open the live page

Terminal Basics

AI agents: See llms.txt for documentation discovery and navigation. Documentation articles are also available as Markdown by appending .md to the article URL. 🎬 Watch The Story of VS Code! VS Code is now on Instagram, follow @vscode.ig for updates, tips, and more. Rewatch GitHub Copilot Day. Terminal Basics View as Markdown Ask in VS Code Ask in VS Code Insiders Visual Studio Code includes a full featured integrated terminal that starts at the root of your workspace.

It provides integration with the editor to support features like links and error detection . The integrated terminal can run commands such as mkdir and git just like a standalone terminal. Note Opening a terminal is blocked when a workspace is in Restricted Mode to prevent shells from automatically executing code based on workspace contents. You can open a terminal as follows: From the menu, use the Terminal > New Terminal or View > Terminal menu commands.

From the Command Palette ( ⇧⌘P (Windows, Linux Ctrl+Shift+P ) ), use the View: Toggle Terminal command. In the Explorer, you can use the Open in Integrated Terminal context menu command to open a new terminal from a folder. To toggle the terminal panel, use the ⌃` (Windows, Linux Ctrl+` ) keyboard shortcut. To create a new terminal, use the ⌃⇧` (Windows, Linux Ctrl+Shift+` ) keyboard shortcut. VS Code's terminal has additional functionality called shell integration that tracks where commands are run with decorations on the left of a command and in the scrollbar: Note If you prefer to work outside VS Code, open an external terminal with the ⇧⌘C (Windows, Linux Ctrl+Shift+C ) keyboard shortcut Terminal shells The integrated terminal can use various shells installed on your machine, with the default being pulled from your system defaults.

Shells are detected and presented in the terminal profiles dropdown. You can learn more about configuring terminal shells in the terminal profiles article. Managing terminals The terminal tabs UI is on the right side of the terminal view. Each terminal has an entry with its name, icon, color, and group decoration (if any). Add terminal instances by selecting the + icon on the top-right of the TERMINAL panel, selecting a profile from the terminal dropdown, or by triggering the ⌃⇧` (Windows, Linux Ctrl+Shift+` ) command.

This action creates another entry in the tab list associated with that terminal. Remove terminal instances by hovering a tab and selecting the Trash Can button, selecting a tab item and pressing Delete , using Terminal: Kill the Active Terminal Instance command, or via the right-click context menu. Navigate between terminal groups using focus next ⇧⌘] (Windows, Linux Ctrl+PageDown ) and focus previous ⇧⌘[ (Windows, Linux Ctrl+PageUp ) .

Icons may appear to the right of the terminal title on the tab label when a terminal's status changes. Some examples are a bell (macOS) and for tasks, displaying a check mark when there are no errors and an X otherwise. Hover the icon to read status information, which may contain actions. Groups (split panes) Place multiple terminals side-by-side and create a group by splitting a terminal: Hover over an entry in the list of terminals on the right and select the inline split button.

Right-click the context menu and select the Split menu option. Alt and click on a tab, the + button, or the single tab on the terminal panel. Trigger the ⌘\ (Windows, Linux Ctrl+Shift+5 ) command. Tip The working directory for the new terminal depends on the terminal.integrated.splitCwd Open in VS Code Open in VS Code Insiders setting . Navigate between terminals in a group by focusing the previous pane, ⌥⌘← (Windows, Linux Alt+Left ) , or the next pane, ⌥⌘→ (Windows, Linux Alt+Right ) .

Dragging and dropping tabs in the list rearranges them. Dragging a tab into the main terminal area allows moving a terminal from one group to another. Moving a terminal into its own group can be done with the Terminal: Unsplit Terminal command through the Command Palette or in the right-click context menu. Terminals in editor area You can open terminals in the editor area (terminal editors) with the Terminal: Create New Terminal in Editor Area command, the Terminal: Create New Terminal in Editor Area to the Side command, or by dragging a terminal from the terminal view into the editor area.

Terminal editors are presented like regular editor tabs: You can have terminal editors on either side or arranged in multiple dimensions using the editor group layout system, e.g. PowerShell and WSL terminals stacked to the right of file editors: The terminal.integrated.defaultLocation Open in VS Code Open in VS Code Insiders setting can change the default view or editor area terminal location. Terminals in new windows Opening a terminal in a new VS Code window is possible in a few different ways: Use ⌃⇧⌥` (Windows, Linux Ctrl+Shift+Alt+` ) Right-click the terminal tab if you have multiple terminals, or left-click the tab if you only have a single terminal opened.

Then select Move Terminal to New Window Select the New Terminal Window entry that's available in several different menus Navigating the buffer The content in the terminal is called the buffer, with the section right above the bottom viewport being called "scrollback". The amount of scrollback kept is determined by the terminal.integrated.scrollback Open in VS Code Open in VS Code Insiders setting and defaults to 1000 lines.

There are various commands available to navigate around the terminal buffer: Scroll up a line - ⌥⌘PageUp (Windows Ctrl+Alt+PageUp , Linux Ctrl+Shift+Up ) Scroll down a line - ⌥⌘PageDown (Windows Ctrl+Alt+PageDown , Linux Ctrl+Shift+Down ) Scroll up a page - PageUp (Windows, Linux Shift+PageUp ) Scroll down a page - PageDown (Windows, Linux Shift+PageDown ) Scroll to the top - ⌘Home (Windows Ctrl+Home , Linux Shift+Home ) Scroll to the bottom - ⌘End (Windows Ctrl+End , Linux Shift+End ) Command navigation is also available (see shell integration ): Scroll to the previous command - ⌘↑ (Windows, Linux Ctrl+Up ) Scroll to the next command - ⌘↓ (Windows, Linux Ctrl+Down ) Scrolling will happen instantaneously, but can be configured to animate over a short duration with the terminal.integrated.smoothScrolling Open in VS Code Open in VS Code Insiders setting.

Links The terminal features sophisticated link detection with editor integration and even extension contributed link handlers. Hover over a link to display an underline, then hold the Ctrl / Cmd key and click. These built-in link handlers are used in the following priority order: URIs/URLs: Links that look like URIs, such as https://code.visualstudio.com , vscode://path/to/file or file://path/to/file will open using the standard handler for the protocol.

For example, https links will open the browser. File links: Links to files that have been verified to exist on the system. These will open the file in a new editor tab and support many common line/column formats such as file:1:2 , file:line 1, column 2 . Folder links: Links to folders are similar to file links but will open a new VS Code window at the folder. Word links: Fallback link type that uses the terminal.integrated.wordSeparators Open in VS Code Open in VS Code Insiders setting.

The setting defines word boundaries and make nearly all text into words. Activating a word link searches the workspace for the word. If there is a single result it will open, otherwise it will present the search results. Word links are considered "low confidence" and will not show an underline or tooltip unless you hold the Ctrl / Cmd key. They also have limited support for line and column suffixes. The Open Detected Link command ( ⇧⌘G (Windows, Linux Ctrl+Shift+G ) ) can be used to access links via the keyboard: Tip If link verification causes performance issues, like in high latency remote environments, disable it via the terminal.integrated.enableFileLinks Open in VS Code O

The rest of this page is on the live site.