1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

WSL1→WSL2の更新がうまくいかず、VERSION 1から変化しない時

Last updated at Posted at 2020-08-19

環境

  • Intel CPU
  • Windows 10 Pro バージョン 2004
  • WSL1でLinuxディストリビューションインストール済み

事象

Windowsのバージョンを2004に更新

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart 実行、正常終了

wsl --set-default-version 2 実行、正常終了

PowerShell
> wsl --list --verbose
  NAME      STATE           VERSION
* Ubuntu    Stopped         1

コマンドはうまくいってるのに、バージョン1のまま...何故🤔

解決方法

WSL1で既にLinuxディストリビューションがインストール済みの場合、WSL2用に変換する必要があります。
参考: Windows 10ミニTips(478) LinuxディストリビューションをWSL 2用に変換する | マイナビニュース

PowerShell
> wsl --set-version Ubuntu 2
変換中です。この処理には数分かかることがあります...
WSL 2 との主な違いについては、https://aka.ms/wsl2 を参照してください
変換が完了しました。
> wsl --list --verbose
  NAME      STATE           VERSION
* Ubuntu    Stopped         2

やったね!

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?