According to the Official page, it seems that the following version or later is required.
WSL 2 is only available on Windows 10, version 2004, build 19041 and above. You may need to update your version of Windows.
For the time being, I checked my Window version.
On the Windows Update screen, "It is up to date" is displayed, but for some reason the version is not enough. We updated the version of Windows from the following page.
When the version update is completed, the following will be displayed.
With reference to Official procedure page, we proceeded with the following introduction.
The "Windows Subsystem for Linux" optional feature must be enabled before installing a Linux distribution on Windows. Open PowerShell as an administrator and do the following:
PS C:\WINDOWS\system32> dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
Deployment image services and management tools
version: 10.0.18362.900
Image version: 10.0.18362.1016
The function is enabled
[==========================100.0%==========================]
The operation completed successfully.
The "Virtual Machine Platform" optional feature must be enabled before installing WSL 2. Open PowerShell as an administrator and do the following:
PS C:\WINDOWS\system32> dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Deployment image services and management tools
version: 10.0.18362.900
Image version: 10.0.18362.1016
The function is enabled
[==========================100.0%==========================]
The operation completed successfully.
Reboot your machine to complete the WSL installation and update to WSL 2.
As an administrator, open PowerShell and run the following command to set WSL 2 as the default version when installing a new Linux distribution.
PS C:\WINDOWS\system32> wsl --set-default-version 2
error: 0x1bc
For the main differences from WSL 2, https://aka.ms/See wsl2
A "0x1bc" error was output. Since there was officially the following description, I thought it was another error, but I tried updating the kernel. Kernel update download link
This message may appear after running the command WSL 2 requires an update to its kernel component. For information please visit https://aka.ms/wsl2kernel. Follow the link (https://aka.ms/wsl2kernel) to install the MSI from this page of the documentation for installing the Linux kernel used by WSL 2 on your computer. After installing the kernel, run the command again and it completes successfully without any message.
After updating the kernel, when I ran it again, no error was output.
PS C:\WINDOWS\system32> wsl --set-default-version 2
For the main differences from WSL 2, https://aka.ms/See wsl2
Open the Microsoft Store and select your preferred Linux distribution.
This time, "Ubuntu 20.04 LTS" was introduced.
After completing the above installation, you will be asked to wait a few minutes the first time you start Ubuntu. After that, you will be asked to set the Ubuntu user and password as shown below, so set them.
When I checked the WSL version assigned to the installed Ubuntu, version 1 was assigned.
PS C:\WINDOWS\system32> wsl --list --verbose
NAME STATE VERSION
* Ubuntu Stopped 1
To assign version 2, use the following command.
PS C:\WINDOWS\system32> wsl --set-version Ubuntu 2
Converting. This process can take a few minutes...
For the main differences from WSL 2, https://aka.ms/See wsl2
The requested operation could not be completed due to a virtual disk system limitation. The virtual hard disk file must be decompressed and encrypted. Also, virtual hard disk files cannot be set to sparse.
An error was displayed saying "The requested operation could not be completed due to a virtual disk system limitation." Since it is recommended to decompress and decrypt the file, the following was performed.
If you go to% localappdata% \ Packages from the URL bar, you can find the Ubuntu distribution entity with a folder name like "CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc". Uncheck Properties> Advanced> Compress Contents to Save Disk Space.
After performing the above, I tried again.
PS C:\WINDOWS\system32> wsl --set-version Ubuntu 2
Converting. This process can take a few minutes...
For the main differences from WSL 2, https://aka.ms/See wsl2
The conversion is complete.
It seems that the setting is completed, so when I check the WSL version assigned to Ubuntu again, the version is updated to 2.
PS C:\WINDOWS\system32> wsl --list --verbose
NAME STATE VERSION
* Ubuntu Stopped 2
This completes the settings!
Recommended Posts