I'm trying to install again Ubuntu on my Windows 10 Home Version 20H2 OS Build 19042.685 using WSL2.
The problem is the WSL2 installation is not finished. I received the following message doing Step 5 - Set WSL 2 as your default version
PS C:\WINDOWS\system32> wsl
The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.
Previous steps done:
PS C:\WINDOWS\system32> dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
Deployment Image Servicing and Management tool
Version: 10.0.19041.572
Image Version: 10.0.19042.685
Enabling feature(s)
[==========================100.0%==========================]
The operation completed successfully.
PS C:\WINDOWS\system32> dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Deployment Image Servicing and Management tool
Version: 10.0.19041.572
Image Version: 10.0.19042.685
Enabling feature(s)
[==========================100.0%==========================]
The operation completed successfully.
PS C:\WINDOWS\system32>
Then I restarted Windows and
execute wsl_update_x64.msi
To set the default version to WSL 1 or WSL 2 when a new Linux distribution is installed, use the command: wsl --set-default-version <Version#> , replacing <Version#> with either 1 or 2.
The Windows Subsystem for Linux optional component is not enabled: Open Control Panel -> Programs and Features -> Turn Windows Feature on or off -> Check Windows Subsystem for Linux or using the PowerShell cmdlet mentioned at the beginning of this article.
Set default Linux distro on WSL2Search for Command Prompt, right-click the top result, and select the Run as administrator option. Quick tip: You can also write the command like this: wsl -l . In the command, replace DISTRO-NAME for the name of the distro to set it as default (see step No. 3).
WSL Version: How to Change WSL Default Version to WSL 2 in Windows 10. To ensure that all future WSL Linux distributions use WSL 2 instead of WSL 1, Open PowerShell as Administrator and run the following command: wsl --set-default-version 2.
The problem is the WSL2 installation is not finished. I received the following message doing Step 5 - Set WSL 2 as your default version PS C:\WINDOWS\system32> wsl The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.
wsl --set-default-version 2 You might receive the following error: WSL 2 requires an update to its kernel component. If that is the case, Install Kernel Updates and run the wsl --set-default-version 2 command again. For any reason, if you don't want to use Windows
To ensure that all future WSL Linux distributions use WSL 2 instead of WSL 1, Open PowerShell as Administrator and run the following command: You might receive the following error: WSL 2 requires an update to its kernel component. If that is the case, Install Kernel Updates and run the wsl --set-default-version 2 command again.
I had the same issue
C:\WINDOWS\system32> wsl --set-default-version 2
The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.
The problem was Kaspersky. The solution is simple Open cmd.exe and run the following code
sc config LxssManager start=auto
Kaspersky will give you a pop-up about a potential thread. Tell Kaspersky to ignore the alert. Please don't click on "Fix it" button for Kaspersky or you will undo the solution.
That should fix it
Docans is right; running:
sc config LxssManager start=auto
in Command Prompt seems to fix the issue. However, you must run Command Prompt as an Administrator. I don't have enough reputation to comment or edit the post to clarify this so I have to make it a separate answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With