Configure Windows Terminal Profiles for PowerShell, WSL, and SSH

  • Thread Author

Configure Windows Terminal Profiles for PowerShell, WSL, and SSH​

Difficulty: Intermediate | Time Required: 20 minutes
Windows Terminal is a versatile hub for all your command-line needs. By configuring distinct profiles for PowerShell, WSL, and SSH, you can switch contexts in seconds without juggling multiple consoles. This guide walks you through creating and tuning those profiles so your workflow stays fast, organized, and productive.

If you’re on Windows 11, Windows Terminal is readily available from the Microsoft Store and is actively updated for new features. On Windows 10, install Terminal from the Microsoft Store (or via a supported build) and ensure you have WSL and OpenSSH Client available. WSL 2 offers faster Linux subsystem performance, but Windows 10 users can start with WSL 1 and upgrade later.
Prerequisites
  • Windows 10 (May 2020 Update 2004 or later) or Windows 11
  • Windows Terminal installed from Microsoft Store
  • WSL installed with at least one Linux distribution (e.g., Ubuntu)
  • OpenSSH Client installed (optional feature; required for SSH profile)
  • Basic familiarity with JSON in case you edit settings.json directly
Step-by-step instructions
1) Verify and prepare prerequisites
  • Check Windows Terminal version: In Windows Terminal, open Settings (Ctrl+,) and confirm you’re using a recent version (v1.8+ is common; newer versions offer smoother WSL integration and UI-based edits).
  • Install/enable WSL:
    • For Windows 11, you can simply run: wsl --install
    • For Windows 10 (1903/2004+): enable the Windows Subsystem for Linux and Virtual Machine Platform features, install a distro from the Microsoft Store, and set default to version 2 if available:
    • In an admin PowerShell:
      • dism /online /enable-feature /featurename:Microsoft-Windows-WindowsSubsystemLinux /all /norestart
      • dism /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
      • Restart, then install Ubuntu from the Store and run: wsl --set-default-version 2
  • Install/enable OpenSSH Client:
    • Windows 10/11: Settings > Apps > Optional Features > Add a feature > OpenSSH Client (or use PowerShell: Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0)
Note: If you’re new to WSL, a quick Ubuntu install is enough to begin building WSL profiles.
2) Open Windows Terminal settings
  • Launch Windows Terminal.
  • Open Settings:
    • Click the drop-down arrow next to the plus tab, then choose Settings.
    • Alternatively, press Ctrl+,.
  • The Settings pane (UI) is friendly, but you can still edit the JSON file directly if you prefer.
Tip: If you work in a JSON mindset, you can click “Open JSON file” to edit your profiles in a text editor. Always back up before editing.
3) Create or customize a PowerShell profile
  • PowerShell comes in two major flavors: Windows PowerShell (powershell.exe) and PowerShell Core (pwsh.exe). You can expose both as separate profiles to choose at startup.
  • UI method:
    • In the Profiles list, choose Add a new profile.
    • For a Windows PowerShell profile, set:
    • Name: PowerShell
    • Commandline: powershell.exe
    • StartingDirectory: %USERPROFILE%
    • Guid: (generate a new GUID, e.g., {a1b2c3d4-e5f6-...})
  • If you want PowerShell 7 (pwsh):
    • Name: PowerShell 7
    • Commandline: pwsh.exe
    • StartingDirectory: %USERPROFILE%
Code snippet (JSON, optional):
{
"guid": "{a1b2c3d4-e5f6-7890-abcd-1234567890ab}",
"name": "PowerShell",
"commandline": "powershell.exe",
"startingDirectory": "%USERPROFILE%",
"hidden": false
}
4) Add a WSL profile
  • If you installed WSL, Windows Terminal can auto-create WSL profiles for each distribution. You can rely on that auto-discovery or add a custom one.
  • UI method:
    • Add a new profile.
    • Choose the Source as Windows.Terminal.Wsl (recommended if available). This will surface each installed distro as a separate tab.
    • If you prefer a manual entry:
    • Name: WSL: Ubuntu
    • Commandline: wsl.exe -d Ubuntu
    • StartingDirectory: //wsl$/Ubuntu/home/USERNAME
  • Example JSON (manual approach):
    {
    "guid": "{b2f3c4d5-e6f7-8901-abcd-112233445566}",
    "name": "WSL: Ubuntu",
    "commandline": "wsl.exe -d Ubuntu",
    "startingDirectory": "//wsl$/Ubuntu/home/USERNAME",
    "hidden": false
    }
Notes:
  • If you enable WSL 2, you’ll get a more Linux-native experience inside Windows Terminal.
  • Using the Source method (Windows.Terminal.Wsl) allows automatic creation per distro; you just need to have WSL distributions installed.
5) Add an SSH profile (to quickly SSH into a server)
  • Use a dedicated SSH profile to quickly connect to a remote server(s).
  • UI method:
    • Add a new profile.
    • Name: SSH to Server
    • Commandline: ssh youruser@yourserver.com
    • StartingDirectory: %USERPROFILE%
    • Optionally set an icon to indicate SSH
  • Example JSON:
    {
    "guid": "{c3d4e5f6-7890-1234-5678-90abcdef1234}",
    "name": "SSH to Server",
    "commandline": "ssh youruser@yourserver.com",
    "startingDirectory": "%USERPROFILE%",
    "hidden": false
    }
Tip: If you frequently connect to multiple hosts, you can define a host alias in your ~/.ssh/config and use a profile like "ssh alias" to simplify: commandline: ssh alias
6) Set a sensible default profile and startup behavior
  • In Settings, locate Default Profile (or DefaultProfile in settings.json) and point it to whichever profile you use most (PowerShell, for example).
  • You can also specify a preferred startingDirectory to land in your project or workspace directory automatically:
    • Example: "startingDirectory": "%USERPROFILE%\Documents\Projects"
7) Personalize appearance and behavior (optional)
  • Color schemes: Pick a color scheme you like (e.g., One Half, Solarized) and apply to your profiles for quick visual recognition.
  • Icons: Add icons for each profile to speed recognition in the tab bar.
  • Quieter startup: In the Profiles section, consider setting "closeOnExit": false if you want Windows Terminal to keep the tab open after a shell exits for quick re-try.
  • Copy on select: Security-conscious teams may prefer to enable the Windows Terminal setting that copies on select for easier code sharing.
8) Save, test, and verify
  • Save your changes in Settings (the UI update saves automatically; editing the JSON also auto-saves).
  • Open new tabs using the plus button and pick each profile to test:
    • PowerShell launches quickly and lands in the correct directory.
    • WSL opens the selected distro.
    • SSH connects to your server without extra prompts or manual steps.
  • If a profile doesn’t appear, restart Windows Terminal or click “Reload JSON” (if editing JSON directly) to refresh.
9) Troubleshooting quick tips
  • If a profile doesn’t launch, double-check the commandline path. For Windows PowerShell use powershell.exe; for PowerShell 7 use pwsh.exe (ensure it’s installed in PATH).
  • If WSL profiles don’t show up, ensure you have at least one distro installed and restart Terminal after enabling WSL.
  • If SSH hosts prompt for a password each time and you want key-based auth, set up SSH keys and ensure the ssh-agent is running to manage keys.
  • If the JSON file syntax is off, Windows Terminal will usually highlight errors in the UI or show a parsing error. Validate JSON with a quick online tool or in a code editor.
10) Optional advanced tips
  • Use separate user profiles for different work contexts (e.g., Dev, Admin, Remote).
  • Create a “Quick SSH” profile that uses an SSH config alias (ssh myserver) rather than an explicit host.
  • If you frequently need root-like privileges, consider a profile that launches a sudo-enabled shell or Windows Terminal profile running a script that elevates permissions as appropriate (with caution for security).
Conclusion
Configuring Windows Terminal with dedicated profiles for PowerShell, WSL, and SSH makes switching between tasks faster, more reliable, and visually organized. You’ll enjoy cleaner workspaces, consistent startup directories, and one-click access to your Linux environment and remote systems—all within a single, modern terminal.
Key Takeaways
  • Separate, dedicated profiles streamline workflow: PowerShell for Windows tasks, WSL for Linux work, and SSH for remote access.
  • WSL profiles can be auto-discovered or manually defined, with WSL 2 delivering better performance.
  • SSH profiles simplify remote connections; combine with SSH config for scalable host management.
  • StartingDirectory and icons help you stay organized; defaults make daily usage effortless.
  • Keeping Windows Terminal updated ensures the best compatibility across PS, WSL, and SSH integrations.

This tutorial was generated to help WindowsForum.com users get the most out of their Windows experience.
 

Back
Top