--PHPer with backend as the main battlefield --For business, build a CentOS virtual environment with Vagrant + ansible ――Fields that are not good at infrastructure and virtualization --Docker is difficult. Still from now on
Specify the file name with Win + R and the execution will start, so type "winver" to check the version and OS build. When I tried it, it had to be version 2004, so I updated it from here. (↑ capture is after update)
From the official document
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:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
Let's open it properly as an administrator when opening powershell. If you do it by someone other than the administrator, an error will occur (I did it)
The "Virtual Machine Platform" optional feature must be enabled before installing WSL 2. Open PowerShell as an administrator and do the following:
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Reboot once here
wsl --set-default-version 2
I got an error once when I executed this (I forgot to capture .. I feel like 0x1bc came out) Apparently the WSL2 Linux kernel needs to be updated. From here Let's drop and update It will be updated if you proceed to Next innocently. When the update is completed, set the default version of WSL again It's OK.
Open the Microsoft Store and install Ubuntu It took about 5 minutes to install. I will start it immediately. You will be asked for a new user name and password, so set it as you like.
that's all. Enjoy Ubuntu Life on Windows: muscle:
Installation Guide for Windows Subsystem for Linux for Windows 10 I tried setting up Windows Subsystem for Linux 2 (WSL 2)
Recommended Posts