I'm trying to install WSL2 on Windows 10 by this guide.
Both features, Microsoft-Windows-Subsystem-Linux and VirtualMachinePlatform, have been enabled:
> Get-WindowsOptionalFeature -Online -FeatureName "Microsoft-Windows-Subsystem-Linux" FeatureName : Microsoft-Windows-Subsystem-Linux DisplayName : Windows Subsystem for Linux Description : Provides services and environments for running native user-mode Linux shells and tools on Windows. RestartRequired : Possible State : Enabled CustomProperties : ServerComponent\Description : Provides services and environments for running native user-mode Linux shells and tools on Windows. ServerComponent\DisplayName : Windows Subsystem for Linux ServerComponent\Id : 1033 ServerComponent\Type : Feature ServerComponent\UniqueName : Microsoft-Windows-Subsystem-Linux ServerComponent\Deploys\Update\Name : Microsoft-Windows-Subsystem-Linux > Get-WindowsOptionalFeature -Online -FeatureName "VirtualMachinePlatform" FeatureName : VirtualMachinePlatform DisplayName : Virtual Machine Platform Description : Enables platform support for virtual machines RestartRequired : Possible State : Enabled CustomProperties :
After enabling each of the features computer was restarted. But I can't set default WSL version as any call to
wsl from the PowerShell started with administrative privileges results in "Access is denied":
> wsl --set-default-version 2 Access is denied. > wsl --help Access is denied.
The error doesn't occur if
wsl is called without administrative privileges but another one does instead:
> wsl --set-default-version 2 Invalid command line option: --set-default-version
The guide says that it means that my OS doesn't meet the requirements for WSL 2:
If wsl –set-default-version results as an invalid command, enter wsl
–help. If the –set-default-version is not listed, it means that your OS doesn't support it and you need to update to version 1903, Build
18362 or higher.
Let's check with
Hmmm… Looks like it satisfies the requirements.
So what's the problem? How can I finish WSL2 installation? What am I doing wrong?