Transition from WSL1 to WSL2

motivation

I'm using Ubuntu 18.04 with WSL1, so I want to run it with WSL2.

procedure

First, type winver in the search window of the start menu to check the version of windows 10. 2020-08-05.png Make sure this version is 2004 and the OS build is 1904 (otherwise you can't update). After checking, enter powershell in the search window of the start menu, run powershell in administrator mode, and change the default setting of wsl to ver 2.

PS C:\WINDOWS\system32> wsl --set-default-version 2
Error: 0x1bc

However, the above error occurred. I had a similar question on StackOverFlow, and the answer was to update the WSL Linux kernel, so I'll do that. Go to https://docs.microsoft.com/en-us/windows/wsl/wsl2-kernel to download and run the Linux kernel update. After execution, open PowerShell again with administrator privileges and execute the following command

PS C:\WINDOWS\system32> wsl --set-default-version 2
For the main differences from WSL 2, https://aka.ms/See wsl2

Apparently, the default-version could be updated, so I changed Ubuntu-18.04, which is already running, to WSL2.

PS C:\WINDOWS\system32> wsl --set-version Ubuntu-18.04 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.

Finally confirm

PS C:\WINDOWS\system32> wsl --list --verbose
  NAME            STATE           VERSION
* Ubuntu-18.04    Stopped         2

Completed safely.

Recommended Posts

Transition from WSL1 to WSL2
How to launch Explorer from WSL
Sum from 1 to 10
Changes from Python 2 to Python 3.0
From editing to execution
Cheating from PHP to Python
Anaconda updated from 4.2.0 to 4.3.0 (python3.5 updated to python3.6)
Migrated from Flask-RESTPlus to Flask-RESTX
Update python-social-auth from 0.1.x to 0.2.x
Migrate from requirements.txt to pipenv
Switch from python2.7 to python3.6 (centos7)
Play WAVE files from WSL
Connect to sqlite from python
Call Matlab from Python to optimize
From Elasticsearch installation to data entry
vtkXMLUnstructuredGridReader Summary (updated from time to time)
vtkOpenFOAMReader Summary (Updated from time to time)
How to use SWIG from waf
Cannot migrate from direct_to_template to TemplateView
Engineer vocabulary (updated from time to time)
Create folders from '01' to '12' with python
Conversion from pdf to txt 1 [pdfminer]
Programming to learn from books May 10
Post from python to facebook timeline
[Lambda] [Python] Post to Twitter from Lambda!
Output from Raspberry Pi to Line
[Introduction] From installing kibana to starting
Convert from pdf to txt 2 [pyocr]
Connect to utf8mb4 database from python
OpenMPI installation from download to pass-through
Tensorflow memo [updated from time to time]
Python (from first time to execution)
Post images from Python to Tumblr
Send commands from Atom to Maya
Programming to learn from books May 7
Bring files in Windows to WSL
From Ubuntu 20.04 introduction to environment construction
Ssh connect to GCP from Windows
How to access wikipedia from python
Python to switch from another language
How to convert from .mgz to .nii.gz
Migrate from VS Code to PyCharm
pynq-z1 From purchase to operation check
Review from git init to git push
Did not change from Python 2 to 3
Update Python on Mac from 2 to 3
Change AWS EC2 instance from t2 to t3
Connect to Packetix VPN from CentOS 7 minimal.
[Python] Fluid simulation: From linear to non-linear
How to create a clone from Github
SIGNATE Quest ① From data reading to preprocessing
Connect to Docker's MySQL container from Flask
Why I moved from Java to Dart
From Python to using MeCab (and CaboCha)
Reinforcement learning to learn from zero to deep
How to easily convert format from Markdown
[Note] [PyTorch] From installation to easy usage
Execute a script from Jupyter to process
Convert from PDF to CSV with pdfplumber
Send a message from Python to Slack
[TF] How to use Tensorboard from Keras