Introduction

VS Code's integrated terminal uses configured shell profiles to launch terminal sessions. When the default profile points to a shell that is not installed or has been moved, the terminal fails to open:

bash
The terminal profile "PowerShell" could not be found.
Would you like to configure another profile?

This commonly occurs after OS upgrades, shell changes, or when opening a workspace with shared settings that reference unavailable shells.

Symptoms

  • Terminal panel shows "Terminal profile not found" error
  • No terminal opens when pressing Ctrl+` (backtick)
  • Terminal dropdown menu shows profiles that do not exist on the current system
  • Works on one machine but fails on another with the same workspace settings
  • Error persists after reinstalling VS Code

Common Causes

  • Workspace .vscode/settings.json specifies a shell path that does not exist on the current machine
  • PowerShell not installed on Linux/macOS (or vice versa, bash on Windows without WSL)
  • OS upgrade changed the shell path (e.g., macOS Catalina switched default from bash to zsh)
  • Shell was uninstalled or moved to a different location
  • Synced settings from another machine with different available shells

Step-by-Step Fix

  1. 1.Select an available terminal profile:
  2. 2.- Click the dropdown arrow next to the + button in the terminal panel
  3. 3.- Choose "Select Default Profile"
  4. 4.- Pick an available shell (bash, zsh, cmd, etc.)
  5. 5.Update workspace settings with a cross-platform default. In .vscode/settings.json:
  6. 6.```json
  7. 7.{
  8. 8."terminal.integrated.defaultProfile.linux": "bash",
  9. 9."terminal.integrated.defaultProfile.osx": "zsh",
  10. 10."terminal.integrated.defaultProfile.windows": "PowerShell"
  11. 11.}
  12. 12.`
  13. 13.Add custom terminal profiles for non-standard shell locations:
  14. 14.```json
  15. 15.{
  16. 16."terminal.integrated.profiles.linux": {
  17. 17."bash": {
  18. 18."path": "/usr/bin/bash",
  19. 19."icon": "terminal-bash"
  20. 20.},
  21. 21."fish": {
  22. 22."path": "/usr/local/bin/fish"
  23. 23.},
  24. 24."custom-python": {
  25. 25."path": "/usr/bin/python3",
  26. 26."args": ["-m", "idlelib"]
  27. 27.}
  28. 28.}
  29. 29.}
  30. 30.`
  31. 31.Verify the shell exists on your system:
  32. 32.```bash
  33. 33.which bash zsh fish pwsh
  34. 34.# Or check all available shells
  35. 35.cat /etc/shells
  36. 36.`
  37. 37.Reset terminal settings to defaults if configurations are corrupted:
  38. 38.- Open Command Palette: Ctrl+Shift+P
  39. 39.- Type "Preferences: Open Settings (JSON)"
  40. 40.- Remove all terminal.integrated.* entries
  41. 41.- Restart VS Code

Prevention

  • Use OS-specific terminal profile settings (defaultProfile.linux, defaultProfile.osx, etc.)
  • Avoid hardcoding absolute shell paths in shared workspace settings
  • Use shellIntegration.enabled: true for better terminal integration
  • Document the expected terminal environment in your project's CONTRIBUTING.md
  • Test workspace settings on all supported platforms (Linux, macOS, Windows)
  • Use environment variables or platform-specific settings for shell paths
  • Keep VS Code Settings Sync enabled to share settings but review terminal profiles per machine
  • Add terminal profile verification to your development environment setup script