Install WSL2 on Windows10¶
Check current Windows environment¶
Check Version¶
Win + r
winver
Check storage size¶
setting > system > memory(記憶域) check enough storage syze(over 10 GB)
Widows update¶
Get windows update manually https://www.microsoft.com/ja-jp/software-download/windows10 Click “Update now” Download windows update assistant and execute it.
On 24 Jan 2021, the latest version is “20H2”
Need to wait update completion .. for a long time Then finally,
Activate¶
Activate WSL¶
Run powershell by administrator authorization Windows > Windows Powershell > (right click) 管理者権限で実行
Activate Windows Subsystem Linux by
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
1 2 3 4 5 6 7 8 9 10 |
|
Enable Virtual Machine Platform¶
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
PS C:\WINDOWS\system32> dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
1 2 3 4 5 6 7 8 |
|
Restart Windows¶
Set WSL2 as a default version of wsl¶
Command prompt or windows powershell
wsl --set-default-version 2
If you see below warning messages, then follow instruction here
PS C:\WINDOWS\system32> wsl --set-default-version 2
1 2 |
|
Then, ##download x64 マシン用 WSL2 Linux カーネル更新プログラム パッケージ## then install it
then activate again.
1 2 |
|
(This is OK)
Install Ubuntu on WSL2¶
Get ubuntu 20.04 LTS at Microsoft Store¶
https://www.microsoft.com/ja-jp/p/ubuntu-2004-lts/9n6svws3rx71?rtc=1&activetab=pivot:overviewtab
Get > Install > Launch
After installation process, asked to enter user name and passord.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
|
Update Ubuntu¶
tato@greenlantern:~$
1 2 |
|
Check wsl version on Windows Powershell¶
1 2 3 4 5 6 7 |
|
Ref. Win10にWSL2とUbuntu 20.04をインストールする https://astherier.com/blog/2020/07/install-wsl2-on-windows-10-may-2020/