How to Create and Configure Terminal Profiles in VS Code

Create custom VS Code terminal profiles with specific shells, arguments, environment variables, icons, and colors. Launch a profile with a keyboard shortcut or set it as the default.

5 min read

A terminal profile is a saved configuration that tells VS Code which shell to launch, what arguments to pass, and how the terminal tab should look. VS Code detects your installed shells and creates basic profiles automatically. You can customize those built-in profiles or create entirely new ones.

If you only want to change which shell opens by default, start with /vscode/how-to-change-the-default-terminal-in-vs-code. Profiles are the next step when you need custom arguments, environment variables, or per-profile keyboard shortcuts.

Once you have profiles set up, learn how to /vscode/how-to-split-terminals-and-run-multiple-terminals-in-vs-code to run different profiles side by side.

Create a profile from a detected shell

The easiest way to create a profile is to base it on a shell VS Code already found.

Open Select Default Profile

Click the dropdown arrow next to the + button in the terminal panel and select Select Default Profile. You can also run this command from the Command Palette.

Click the Configure button

Each detected shell shows a gear icon on the right. Click it next to the shell you want to customize. VS Code adds a profile entry to your settings.json and opens it for editing.

Customize the profile

The generated entry includes the shell's path (or source on Windows). Edit the name, add arguments, or set other properties as needed. Save settings.json.

Profile properties

A profile can include any of these properties:

PropertyDescriptionExample
pathFull path to the shell executable"/bin/zsh"
source(Windows only) Use a known shell name like Git Bash or PowerShell"PowerShell"
argsArray of command-line arguments passed to the shell["-l"] for a login shell
envMap of environment variables to set or remove (null removes){ "NODE_ENV": "development" }
overrideNameWhen true, the tab shows the profile name instead of the detected process nametrue
iconAn icon ID for the terminal tabterminal-bash
colorA theme color ID for the icon"terminal.ansiGreen"

Profile examples

PowerShell without profile script (Windows)

This profile starts PowerShell with the -NoProfile flag, skipping the profile script and launching faster:

jsonjson
{
  "terminal.integrated.profiles.windows": {
    "PowerShell -NoProfile": {
      "source": "PowerShell",
      "args": ["-NoProfile"]
    }
  }
}

The source property tells VS Code to use its known PowerShell installation rather than a hardcoded path.

zsh login shell (macOS/Linux)

This profile runs zsh with the -l flag, which makes it a login shell and sources .zprofile:

jsonjson
{
  "terminal.integrated.profiles.linux": {
    "zsh (login)": {
      "path": "zsh",
      "args": ["-l"]
    }
  }
}

On macOS, use the osx platform key instead of linux.

Profile with environment variables

This profile sets the Node environment to development and removes the DEBUG variable entirely. Add or remove variables in the env map as needed:

jsonjson
{
  "terminal.integrated.profiles.osx": {
    "Node Dev": {
      "path": "/bin/zsh",
      "env": {
        "NODE_ENV": "development",
        "DEBUG": null
      }
    }
  }
}

Setting a variable to null removes it from the environment for that profile only.

WSL distribution (Windows)

This profile opens a specific WSL distro by name instead of the default one:

jsonjson
{
  "terminal.integrated.profiles.windows": {
    "Debian (WSL)": {
      "path": "C:\\WINDOWS\\System32\\wsl.exe",
      "args": ["-d", "Debian"]
    }
  }
}

Assign a keyboard shortcut to a profile

You can bind a specific key combination to open a terminal with a particular profile.

Open the Command Palette and run Preferences: Open Keyboard Shortcuts (JSON). Add an entry like this:

jsonjson
{
  "key": "ctrl+shift+t",
  "command": "workbench.action.terminal.newWithProfile",
  "args": {
    "profileName": "zsh (login)",
    "location": "editor"
  }
}

Replace zsh (login) with the exact name of your profile. The location can be editor to open the terminal in the editor area or omitted to use the default panel location.

Configure the task and debug profile

By default, build tasks and debug sessions use your default terminal profile. If your default shell has a heavy startup script or is not POSIX-compatible, you can set a separate profile for automated use:

jsonjson
{
  "terminal.integrated.automationProfile.osx": {
    "path": "/bin/sh"
  }
}

This tells VS Code to use /bin/sh when launching terminals for tasks and debug, while your interactive terminals still use your chosen default. This keeps task output clean and predictable.

Remove unwanted profiles

To hide a built-in profile from the dropdown, set its name to null in your settings:

jsonjson
{
  "terminal.integrated.profiles.windows": {
    "Git Bash": null
  }
}

The profile disappears from the new terminal dropdown and the Select Default Profile list. You can restore it later by removing the null entry.

Unsafe profile warnings

If a shell is installed at a path writable by other users (common on Windows), VS Code marks it as an unsafe profile. It will not appear as a selectable profile until you explicitly configure it. When you do, a warning dialog appears asking you to confirm. This protects you from accidentally running a shell that another user could have tampered with.

Rune AI

Rune AI

Key Insights

  • Run Terminal: Select Default Profile and click the Configure button next to a shell to create a new profile.
  • Define profiles in settings.json under terminal.integrated.profiles.{platform}.
  • Each profile can have a path (or source on Windows), args, env, icon, color, and overrideName.
  • Assign a keyboard shortcut to any profile with the workbench.action.terminal.newWithProfile command.
  • Remove built-in profiles by setting their name to null in settings.json.
RunePowered by Rune AI

Frequently Asked Questions

How do I remove a built-in terminal profile I never use?

Open settings.json and set the profile name to `null`. For example, to remove Git Bash on Windows: `"terminal.integrated.profiles.windows": { "Git Bash": null }`. The profile disappears from the dropdown and Quick Pick menus.

Can I set different environment variables for different terminal profiles?

Yes. Add an `env` map to your profile definition. Each key-value pair sets an environment variable. Set a value to `null` to remove that variable from the environment for that profile only.

How do I use the same terminal profile for tasks and debugging but a different one for manual terminals?

Set `terminal.integrated.automationProfile.{platform}` to a profile used only for tasks and debug sessions. This separates your interactive terminal default from what build and debug tasks use.

Conclusion

Terminal profiles give you complete control over shell selection, startup arguments, environment variables, and appearance. Create a profile once in settings.json, then launch it from the dropdown, a keyboard shortcut, or as the default for automated tasks.