0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

WSLをインストールする

Posted at

【目的】
新規PCにWSLをインストールする必要があったのでついでに備忘録を作成する

【環境】
Windows11 (HOME)

目次

1. 機能の有効化
2. WSLのインストール
3. エラーが発生した場合

1. コントロールパネルにて機能を有効化する

「コントロールパネル」>「プログラム」>「プログラムと機能」>「Windowsの機能の有効化または無効化」にて
・「Linux用Windowsサブシステム」
・「仮想マシンとプラットフォーム」
にチェックを入れてOKを押す
image.png

2. WSLをインストールする

ターミナルにて以降のコマンドを叩いていく

terminal
$ wsl --install

WSLのインストールが完了したらディストリビューションをインストールする。
インストール方法はいくつかあるが以前紹介したものとは別の方法で行う。
以前の方法はこちら

以下のコマンドにてインストールできるディストリビューション一覧が表示される

terminal
$ wsl --list --online

以下のコマンドにてディストリビューションをインストールする

terminal
$ wsl --install <Distribution Name>

wsl --list --onlineにて表示されたディストリビューション名をwsl --install Ubuntu-24.04のように指定する

インストールが完了し、WSLが起動できるとユーザ名とパスワードの入力を求められるので任意のユーザ名/パスワードを入力する

Enter new UNIX username: 
New password:
Retype new password:

Installation successful!
と表示されたら終了!

3. WSLインストール時にエラーが発生した場合

コントロールパネルの設定が完了しているのに以下のエラーが表示された場合

Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS.

PCを再起動し、BIOSに入る(PC起動直後にF2キーを押す※メーカーによってはキーが異なる)

virtualizationをenabledに変更する。
BIOSについては機種によって異なるため、各自自力で頑張っていただきたい、、、
知識不足で申し訳ないです、、、、

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?