Eh !? Run Linux on Windows? I can do it! !! (I set WSL2 and put Ubuntu)

Worker skills

--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

First, check the version of Windows 10

Specify the file name with Win + R and the execution will start, so type "winver" to check the version and OS build. update完了.PNG When I tried it, it had to be version 2004, so I updated it from here. (↑ capture is after update)

Enable the "Windows Subsystem for Linux" option

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) WSL有効キャプチャ.PNG

Enable the optional component of "Virtual Machine Platform"

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

仮想マシンプラットフォームの有効化キャプチャ.PNG

Reboot once here

Set WSL 2 as the default version

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 なんかアプデキャプチャ.PNG It will be updated if you proceed to Next innocently. When the update is completed, set the default version of WSL again wsl2デフォルト設定キャプチャ.PNG It's OK.

Ubuntu installation

Open the Microsoft Store and install Ubuntu windowsストアキャプチャ.PNG It took about 5 minutes to install. I will start it immediately. ubuntuキャプチャ.PNG 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:

reference

Installation Guide for Windows Subsystem for Linux for Windows 10 I tried setting up Windows Subsystem for Linux 2 (WSL 2)

Recommended Posts

Eh !? Run Linux on Windows? I can do it! !! (I set WSL2 and put Ubuntu)
Until you put Ubuntu 20 on Windows 10 Home and WSL2 and run Docker
I built an Ubuntu environment on Windows 10 using WSL2.
Create Dockerfile, docker-compose.yml and run nodejs on windows10, Linux, Raspberry Pi
Run NordVPN on Docker (Windows) Ubuntu container
[Even beginners can do it! ] How to create Java environment on Windows 10 (JDK14.0.1)
I installed Docker on EC2 and started it
Docker on Ubuntu18.04 on WSL2 and VSCode installation instructions
Operate Docker Desktop for Windows on Linux (WSL)
What to do when booting Ubuntu on WSL2 and getting "Process terminated with code 1"
I couldn't run Processing on jdk-9, so I reverted to jdk-1.8 and it worked on Eclipse OXYGEN
Ssh to Ubuntu on VirtualBox on your Mac and do it until you install Docker
[Even beginners can do it! ] How to install Eclipse on Windows 10 (Java environment construction)
I want to use NetBeans on Mac → I can use it!
I tried using YOLO v4 on Ubuntu and ROS
Install rbenv with apt on ubuntu and put ruby
I installed CentOS 8 on Windows 10 using VirtualBox and Vagrant
Talk about introducing Ubuntu 20.04 on Windows 10 and text editor
When I set webpack.config.js to run vue.js on rails6, I got too many errors and grass