Cannot create a second WSL profile #4603

Closed
opened 2026-01-30 23:51:40 +00:00 by claunia · 10 comments
Owner

Originally created by @pottereric on GitHub (Oct 23, 2019).

I've added several profiles for various work scenarios. As long as I'm using cmd as the command line it works fine. But if I try to add a second profile using the WSL tools, it won't show up in the new terminal dropdown list.

I want to have 2 WSL profiles, one with the normal font for my standard work and one with a larger font for presentations. I copied the default profile, changed the GUID and the font size.

    {
      "guid": "{2c4de342-38b7-51cf-b940-2309a097f518}",
      "hidden": false,
      "name": "Ubuntu",
      "source": "Windows.Terminal.Wsl", 
      "fontSize": 12
    },
     {
      "guid": "{e6dd8b9a-fbeb-430c-a3cb-3b95ed4cc707}",
      "hidden": false,
      "name": "UbuntuBig",
      "source": "Windows.Terminal.Wsl", 
      "fontSize": 24
    },

With this saved in my profiles.json, the "Ubuntu" option shows up in the dropdown list, but not "UbuntuBig".

Am I misunderstanding how the profile layer works? Is there something different I need to do in order to have a 2nd profile based on a dynamic profile? Is there some other way to create a profile that uses WSL?

Originally created by @pottereric on GitHub (Oct 23, 2019). I've added several profiles for various work scenarios. As long as I'm using cmd as the command line it works fine. But if I try to add a second profile using the WSL tools, it won't show up in the new terminal dropdown list. I want to have 2 WSL profiles, one with the normal font for my standard work and one with a larger font for presentations. I copied the default profile, changed the GUID and the font size. ``` { "guid": "{2c4de342-38b7-51cf-b940-2309a097f518}", "hidden": false, "name": "Ubuntu", "source": "Windows.Terminal.Wsl", "fontSize": 12 }, { "guid": "{e6dd8b9a-fbeb-430c-a3cb-3b95ed4cc707}", "hidden": false, "name": "UbuntuBig", "source": "Windows.Terminal.Wsl", "fontSize": 24 }, ``` With this saved in my profiles.json, the "Ubuntu" option shows up in the dropdown list, but not "UbuntuBig". Am I misunderstanding how the profile layer works? Is there something different I need to do in order to have a 2nd profile based on a dynamic profile? Is there some other way to create a profile that uses WSL?
claunia added the Resolution-By-DesignNeeds-Tag-Fix labels 2026-01-30 23:51:40 +00:00
Author
Owner

@Biswa96 commented on GitHub (Oct 23, 2019):

There should be a distribution installed with UbuntuBig name.

@Biswa96 commented on GitHub (Oct 23, 2019): There should be a distribution installed with `UbuntuBig` name.
Author
Owner

@DHowett-MSFT commented on GitHub (Oct 23, 2019):

Yeah, this is something our documentation can do better at explaining. To add a new profile based on a dynamic one, add a new entry with a new guid, give it a ”commandline”, and any other options you want. Remove the “source”.

In your case, drop source and add commandline = wsl-d Ubuntu.

I realize that that profile isn’t, at that point, even “based on” the original dynamic profile. It’s just a new one that is inspired by it.

@DHowett-MSFT commented on GitHub (Oct 23, 2019): Yeah, this is something our documentation can do better at explaining. To add a new profile based on a dynamic one, add a new entry with a new guid, give it a ”commandline”, and any other options you want. Remove the “source”. In your case, drop source and add commandline = `wsl-d Ubuntu`. I realize that that profile isn’t, at that point, even “based on” the original dynamic profile. It’s just a new one that is inspired by it.
Author
Owner

@carlos-zamora commented on GitHub (Oct 23, 2019):

Even though this is by design, should we make it such that a scenario like above is supported? I think it would make more sense that way. Think "abstract classes" where source just means this is what this is based off of?

@carlos-zamora commented on GitHub (Oct 23, 2019): Even though this is by design, should we make it such that a scenario like above is supported? I think it would make more sense that way. Think "abstract classes" where source just means this is what this is based off of?
Author
Owner

@DHowett-MSFT commented on GitHub (Oct 23, 2019):

We should probably consider something like that. I'd prefer it to be filed in a separate followup issue, though, so I'm going to close this one as "by design, sorry, our docs could be better."

@DHowett-MSFT commented on GitHub (Oct 23, 2019): We should probably consider something like that. I'd prefer it to be filed in a separate followup issue, though, so I'm going to close this one as "by design, sorry, our docs could be better."
Author
Owner

@pottereric commented on GitHub (Oct 23, 2019):

It works exactly as I want it to when, as suggested, I replace the source with:

"commandline": "wsl -d Ubuntu",

Thanks for the clarification.

@pottereric commented on GitHub (Oct 23, 2019): It works exactly as I want it to when, as suggested, I replace the source with: "commandline": "wsl -d Ubuntu", Thanks for the clarification.
Author
Owner

@DHowett-MSFT commented on GitHub (Oct 23, 2019):

Sure thing! Thanks for following up.

@DHowett-MSFT commented on GitHub (Oct 23, 2019): Sure thing! Thanks for following up.
Author
Owner

@darkvertex commented on GitHub (Apr 13, 2021):

[Update: Apparently this is a bad idea. Ignore this.]

Just a helpful tip for the next person coming here from Google search results for WSL secondary profiles in Windows Terminal...

So I had just installed an off-Windows-Store WSL distro of CentOS8 and was searching how to configure a second WSL profile, which brought me here.

"commandline": "wsl -d Ubuntu", works but I wanted to share this also worked:

"name": "CentOS8",
"source": "Windows.Terminal.Wsl",

It seems that when the source is Windows.Terminal.Wsl, the name key is treated as the distro name.

(I have "Ubuntu" and "CentOS8" installed and Windows Terminal lets me access both.)

@darkvertex commented on GitHub (Apr 13, 2021): [Update: Apparently this is a bad idea. Ignore this.] _~~Just a helpful tip for the next person coming here from Google search results for WSL secondary profiles in Windows Terminal...~~_ ~~So I had just installed an off-Windows-Store [WSL distro of CentOS8](https://github.com/mishamosher/CentOS-WSL) and was searching how to configure a second WSL profile, which brought me here.~~ ~~`"commandline": "wsl -d Ubuntu",` works but I wanted to share this also worked:~~ ``` "name": "CentOS8", "source": "Windows.Terminal.Wsl", ``` ~~It seems that when the source is `Windows.Terminal.Wsl`, the `name` key is treated as the distro name.~~ ~~(I have "Ubuntu" and "CentOS8" installed and Windows Terminal lets me access both.)~~
Author
Owner

@DHowett commented on GitHub (Apr 13, 2021):

I must recommend that you do not do this 😉

If you tell us the "source" is "Windows.Terminal.Wsl", we will ask WSL if it knows anything about this profile. This is entirely based on an internal ID that is generated based on the name, or the guid if you provide one. For the vast majority of people, the WSL generator will have no idea what profile we're asking about. When we get that reply back, we'll just silently delete the profile.

@DHowett commented on GitHub (Apr 13, 2021): I must recommend that you do not do this :wink: If you tell us the "source" is "Windows.Terminal.Wsl", we will _ask WSL if it knows anything about this profile_. This is entirely based on an internal ID that is generated based on the name, or the `guid` _if you provide one_. For the vast majority of people, the WSL generator will have no idea what profile we're asking about. When we get that reply back, we'll just silently delete the profile.
Author
Owner

@DHowett commented on GitHub (Apr 13, 2021):

To make a custom WSL profile, set commandline and name. Delete source. That's it.

@DHowett commented on GitHub (Apr 13, 2021): To make a custom WSL profile, set commandline and name. Delete source. That's it.
Author
Owner

@darkvertex commented on GitHub (Apr 13, 2021):

@DHowett Ha, duly noted then! Appreciate the explanation. Sorry for my misleading tip and thank you for correcting me. 🤐 I've scratched off my original comment.

@darkvertex commented on GitHub (Apr 13, 2021): @DHowett Ha, duly noted then! Appreciate the explanation. Sorry for my misleading tip and thank you for correcting me. 🤐 I've scratched off my original comment.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#4603