I am trying to run a Linux program on my laptop for the first time. My machine is running Windows 11. I've followed online guides for installing Ubuntu on WSL such as the ones here:
https://learn.microsoft.com/en-us/windows/wsl/install
https://learn.microsoft.com/en-us/windows/wsl/install-manual
https://learn.microsoft.com/en-us/windows/wsl/setup/environment
But when I install Ubuntu I get the error in the picture below:
Here are the commands I've been running to try to resolve.
Confirming WSL is installed:
PS C:UsersUser> wsl --install
Windows Subsystem for Linux is already installed.
The following is a list of valid distributions that can be installed.
Install using 'wsl --install -d <Distro>'.
NAME FRIENDLY NAME
Ubuntu Ubuntu
Debian Debian GNU/Linux
kali-linux Kali Linux Rolling
SLES-12 SUSE Linux Enterprise Server v12
SLES-15 SUSE Linux Enterprise Server v15
Ubuntu-18.04 Ubuntu 18.04 LTS
Ubuntu-20.04 Ubuntu 20.04 LTS
OracleLinux_8_5 Oracle Linux 8.5
OracleLinux_7_9 Oracle Linux 7.9
PS C:UsersUser> wsl -l -v
Windows Subsystem for Linux has no installed distributions.
Distributions can be installed by visiting the Microsoft Store:
https://aka.ms/wslstore
Install Ubuntu, launch, get the error message in the attached image. Follow the command instructions in that error message:
PS C:UsersUser> wsl --shutdown
PS C:UsersUser> wsl --unregister Ubuntu
Unregistering...
There is no distribution with the supplied name.
Uninstall Ubuntu manually:
PS C:UsersUser> wsl --install -d Ubuntu
Installing: Ubuntu
Ubuntu has been installed.
Launching Ubuntu...
In a separate Ubuntu shell:
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80370102
Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS.
For information please visit https://aka.ms/enablevirtualization
Press any key to continue...
I've already enabled virtualization, confirmed with systeminfo.exe
:
PS C:UsersUser> systeminfo.exe
...
Hyper-V Requirements: VM Monitor Mode Extensions: Yes
Virtualization Enabled In Firmware: Yes
Second Level Address Translation: Yes
Data Execution Prevention Available: Yes