• Welcome to Support Forum: Get Support for Patch My PC Products and Services.
 

How to set the WSL Version to 2 for "Windows Subsystem for Linux (MSI-x64)"

Started by muja1913, September 13, 2024, 04:33:42 AM

Previous topic - Next topic

muja1913

HI,

I want to know in "Windows Subsystem for Linux (MSI-x64)" application does it set the WSL version to 2 while installing or we need to use the additional argument for this?

If we need to use the additional argument, can you please share me how i must include the command.

Thanks,
Muja

Liviu (Patch My PC)

Hello muja1913,

The version of WSL we currently support is 2.2.4.0.
You can see that by right-clicking on the software in Patch My PC --> Show Package Info.

muja1913

Hi,

What i actually need is do i need to set the default WSL version to Version 2 after installing this or will it be set to wsl version = 2 when i install the app via PMPC.

Command used to set the default version = wsl --set-default-version 2

Thanks,
Muja

Liviu (Patch My PC)

Apologies for misunderstanding your initial ask.

You are correct, the argument you found in the meantime is the right one.
Linking the MS doc, in case it's needed by anyone else too.
https://learn.microsoft.com/en-us/windows/wsl/basic-commands#set-default-wsl-version

muja1913

Hi

Noted and it didn't work for me when I added this so can you share me a screenshot of how to add this argument in PMPC?

Thanks,
Muja

Liviu (Patch My PC)

hey Muja,

You can right-click on "Windows Subsystem for Linux (MSI-x64) and choose the "Modify Command Line" right-click option.


Depending in which platform our tool is packaging the software, a republish might be necessary.
Please see this KB article for more details:
https://patchmypc.com/when-and-how-to-republish-third-party-updates

PS_Alex

Quick suggestion here?
Install or update WSL as-is from Patch My PC on a test device, then run the wsl --set-default-version 2 command from within PsExec launched in the SYSTEM context. See if it does configure WSL to version 2.

I don't have a lot of experience with WSL, but I'm wondering if WSL's version is configured per-device or per-user? If the latter, and the wsl --set-default-version... command does nothing under PsExec, that may explain why adding it as a post-install/post-update script has no effect.