WSL Dynamic profile stopped working when switching to Windows Store WSL Preview #15665

Closed
opened 2026-01-31 04:44:54 +00:00 by claunia · 5 comments
Owner

Originally created by @nitz on GitHub (Oct 24, 2021).

Windows Terminal version (or Windows build number)

1.11.2731.0 on Windows 22000.282

Other Software

wsl --version
WSL version: 0.48.2.0
Kernel version: 5.10.60.1
WSLg version: 1.0.29

Steps to reproduce

I have been using a single WSL Distro, Ubuntu, via the traditionally installed (via the Windows component) for a while now. I downloaded the WSL version through the Microsoft Store, and uninstalled the windows component.

My WSL distro still works as expected. (launching via the Ubuntu 'app', or via wsl from a terminal.)

My settings.json contains

...
      {
        "guid": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}",
        "hidden": false,
        "name": "Ubuntu-20.04",
        "source": "Windows.Terminal.Wsl"
      },
...
  • Install WSL via wsl --install
  • Install Ubuntu from the Microsoft Store
  • Launch Ubuntu and set it up, so it creates the dynamic profile in WT.
  • Close everything.
  • Install Windows Subsystem for Linux Preview from the Microsoft Store.
  • Uninstall the WSL component from Windows.
  • Observe the profile no longer shows in the WT dropdown.

Expected Behavior

The WSL profile to still be visible and launchable.

Actual Behavior

The profile does not show up in the dropdown.

image

Originally created by @nitz on GitHub (Oct 24, 2021). ### Windows Terminal version (or Windows build number) 1.11.2731.0 on Windows 22000.282 ### Other Software wsl --version WSL version: 0.48.2.0 Kernel version: 5.10.60.1 WSLg version: 1.0.29 ### Steps to reproduce I have been using a single WSL Distro, Ubuntu, via the traditionally installed (via the Windows component) for a while now. I downloaded the WSL version through the Microsoft Store, and uninstalled the windows component. My WSL distro still works as expected. (launching via the Ubuntu 'app', or via `wsl` from a terminal.) My `settings.json` contains ```json ... { "guid": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}", "hidden": false, "name": "Ubuntu-20.04", "source": "Windows.Terminal.Wsl" }, ... ``` - Install WSL via `wsl --install` - Install Ubuntu from the Microsoft Store - Launch Ubuntu and set it up, so it creates the dynamic profile in WT. - Close everything. - Install `Windows Subsystem for Linux Preview` from the Microsoft Store. - Uninstall the WSL component from Windows. - Observe the profile no longer shows in the WT dropdown. ### Expected Behavior The WSL profile to still be visible and launchable. ### Actual Behavior The profile does not show up in the dropdown. ![image](https://user-images.githubusercontent.com/602691/138576047-244ea64e-f3cb-4289-9d0b-7066a3956411.png)
claunia added the Resolution-Duplicate label 2026-01-31 04:44:54 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Oct 24, 2021):

oh no.

Can you tell me what's in Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss in the registry? Easiest way to do that is to export the whole lxss key to a text file in regedit. For example, mine looks like:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss]
"DefaultDistribution"="{b600dbdf-14ce-4d0b-a03d-91ae7ad0c7ec}"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss\{b600dbdf-14ce-4d0b-a03d-91ae7ad0c7ec}]
"State"=dword:00000001
"DistributionName"="Ubuntu-18.04"
"Version"=dword:00000002
"BasePath"="C:\\Users\\migrie\\AppData\\Local\\Packages\\CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc\\LocalState"
"Flags"=dword:0000000f
"DefaultUid"=dword:000003e8
"PackageFamilyName"="CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc"


@zadjii-msft commented on GitHub (Oct 24, 2021): oh _no_. Can you tell me what's in `Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss` in the registry? Easiest way to do that is to export the whole `lxss` key to a text file in regedit. For example, mine looks like: ``` Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss] "DefaultDistribution"="{b600dbdf-14ce-4d0b-a03d-91ae7ad0c7ec}" [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss\{b600dbdf-14ce-4d0b-a03d-91ae7ad0c7ec}] "State"=dword:00000001 "DistributionName"="Ubuntu-18.04" "Version"=dword:00000002 "BasePath"="C:\\Users\\migrie\\AppData\\Local\\Packages\\CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc\\LocalState" "Flags"=dword:0000000f "DefaultUid"=dword:000003e8 "PackageFamilyName"="CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc" ```
Author
Owner

@nitz commented on GitHub (Oct 24, 2021):

Sure thing, here it is:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss]
"DefaultVersion"=dword:00000002
"DefaultDistribution"="{839b7d03-543c-4f52-baf0-d24b095709ee}"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss\{839b7d03-543c-4f52-baf0-d24b095709ee}]
"State"=dword:00000001
"DistributionName"="Ubuntu"
"Version"=dword:00000002
"BasePath"="C:\\Users\\cmd\\AppData\\Local\\Packages\\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\\LocalState"
"Flags"=dword:0000000f
"DefaultUid"=dword:000003e8
"PackageFamilyName"="CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc"
"KernelCommandLine"="BOOT_IMAGE=/kernel init=/init"
"DefaultEnvironment"=hex(7):48,00,4f,00,53,00,54,00,54,00,59,00,50,00,45,00,3d,\
  00,78,00,38,00,36,00,5f,00,36,00,34,00,00,00,4c,00,41,00,4e,00,47,00,3d,00,\
  65,00,6e,00,5f,00,55,00,53,00,2e,00,55,00,54,00,46,00,2d,00,38,00,00,00,50,\
  00,41,00,54,00,48,00,3d,00,2f,00,75,00,73,00,72,00,2f,00,6c,00,6f,00,63,00,\
  61,00,6c,00,2f,00,73,00,62,00,69,00,6e,00,3a,00,2f,00,75,00,73,00,72,00,2f,\
  00,6c,00,6f,00,63,00,61,00,6c,00,2f,00,62,00,69,00,6e,00,3a,00,2f,00,75,00,\
  73,00,72,00,2f,00,73,00,62,00,69,00,6e,00,3a,00,2f,00,75,00,73,00,72,00,2f,\
  00,62,00,69,00,6e,00,3a,00,2f,00,73,00,62,00,69,00,6e,00,3a,00,2f,00,62,00,\
  69,00,6e,00,3a,00,2f,00,75,00,73,00,72,00,2f,00,67,00,61,00,6d,00,65,00,73,\
  00,3a,00,2f,00,75,00,73,00,72,00,2f,00,6c,00,6f,00,63,00,61,00,6c,00,2f,00,\
  67,00,61,00,6d,00,65,00,73,00,00,00,54,00,45,00,52,00,4d,00,3d,00,78,00,74,\
  00,65,00,72,00,6d,00,2d,00,32,00,35,00,36,00,63,00,6f,00,6c,00,6f,00,72,00,\
  00,00,00,00

My profile GUID doesn't have to match the distro guid there, does it?

@nitz commented on GitHub (Oct 24, 2021): Sure thing, here it is: ``` Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss] "DefaultVersion"=dword:00000002 "DefaultDistribution"="{839b7d03-543c-4f52-baf0-d24b095709ee}" [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss\{839b7d03-543c-4f52-baf0-d24b095709ee}] "State"=dword:00000001 "DistributionName"="Ubuntu" "Version"=dword:00000002 "BasePath"="C:\\Users\\cmd\\AppData\\Local\\Packages\\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\\LocalState" "Flags"=dword:0000000f "DefaultUid"=dword:000003e8 "PackageFamilyName"="CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc" "KernelCommandLine"="BOOT_IMAGE=/kernel init=/init" "DefaultEnvironment"=hex(7):48,00,4f,00,53,00,54,00,54,00,59,00,50,00,45,00,3d,\ 00,78,00,38,00,36,00,5f,00,36,00,34,00,00,00,4c,00,41,00,4e,00,47,00,3d,00,\ 65,00,6e,00,5f,00,55,00,53,00,2e,00,55,00,54,00,46,00,2d,00,38,00,00,00,50,\ 00,41,00,54,00,48,00,3d,00,2f,00,75,00,73,00,72,00,2f,00,6c,00,6f,00,63,00,\ 61,00,6c,00,2f,00,73,00,62,00,69,00,6e,00,3a,00,2f,00,75,00,73,00,72,00,2f,\ 00,6c,00,6f,00,63,00,61,00,6c,00,2f,00,62,00,69,00,6e,00,3a,00,2f,00,75,00,\ 73,00,72,00,2f,00,73,00,62,00,69,00,6e,00,3a,00,2f,00,75,00,73,00,72,00,2f,\ 00,62,00,69,00,6e,00,3a,00,2f,00,73,00,62,00,69,00,6e,00,3a,00,2f,00,62,00,\ 69,00,6e,00,3a,00,2f,00,75,00,73,00,72,00,2f,00,67,00,61,00,6d,00,65,00,73,\ 00,3a,00,2f,00,75,00,73,00,72,00,2f,00,6c,00,6f,00,63,00,61,00,6c,00,2f,00,\ 67,00,61,00,6d,00,65,00,73,00,00,00,54,00,45,00,52,00,4d,00,3d,00,78,00,74,\ 00,65,00,72,00,6d,00,2d,00,32,00,35,00,36,00,63,00,6f,00,6c,00,6f,00,72,00,\ 00,00,00,00 ``` My profile GUID doesn't have to match the distro guid there, does it?
Author
Owner

@zadjii-msft commented on GitHub (Oct 25, 2021):

My profile GUID doesn't have to match the distro guid there, does it?

No, definitely not. I was worried that the store version of WSL might not be storing distros in the registry anymore. I think I know what's going on here though. I think this is the same root cause as #11510. You should be able to confirm that by going into your state.json file, finding the guid that matches your wsl profile, and deleting it there. (state.json lives next to settings.json)

/dup #11510

@zadjii-msft commented on GitHub (Oct 25, 2021): > My profile GUID doesn't have to match the distro guid there, does it? No, definitely not. I was worried that the store version of WSL might not be storing distros in the registry anymore. I think I know what's going on here though. I think this is the same root cause as #11510. You should be able to confirm that by going into your `state.json` file, finding the guid that matches your wsl profile, and deleting it there. (`state.json` lives next to `settings.json`) /dup #11510
Author
Owner

@ghost commented on GitHub (Oct 25, 2021):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Oct 25, 2021): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Author
Owner

@nitz commented on GitHub (Oct 25, 2021):

I can confirm that removing state.json fixed it! I spent a good bit googling around trying to find the 'how do i make WT re-generate dynamic profiles' and didn't find or think to look in the folder next to settings.json

Thanks for your help, @zadjii-msft!

@nitz commented on GitHub (Oct 25, 2021): I can confirm that removing `state.json` fixed it! I spent a good bit googling around trying to find the 'how do i make WT re-generate dynamic profiles' and didn't find or think to look in the folder next to `settings.json` Thanks for your help, @zadjii-msft!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#15665