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

WSL2のインストール

Posted at

1.WSL2のインストール方法

1.Windows PowerShellを起動し、下記のコマンドを実行してください。

wsl --install

この操作のみで、WSL2の有効化、必要なコンポーネントのインストール、Ubuntuのダウンロードとインストールが自動で行われます。

2.PCを再起動する
コマンド実行後、再起動を促されますので、PCを再起動します。

3.Ubuntuの初期設定
再起動後、自動的にUbuntuが起動し、ユーザー名とパスワードの設定を求められます。
パスワード入力時、画面には何も表示されませんが、入力はされています。

設定が完了すればUbuntuのターミナルが利用できます。
Microsoft StoreからWSLやUbuntuを直接インストールする方法もありますが、wsl --install コマンドが最も手軽です。

補足:特定のバージョンのUbuntuをインストールする場合
wsl --install -d Ubuntu-22.04 のように、-d オプションでディストリビューションを指定することもできます。

:hugging: インストールされたか確認する

1.Windows PowerShellを起動し、下記のコマンドを実行してください。

方法1)

wsl --status

結果

既定のディストリビューション: Ubuntu-20.04
既定のバージョン: 2

WSLでインストール可能なディストリビューションの確認方法です。

wsl --list --online
NAME                            FRIENDLY NAME
Ubuntu                          Ubuntu
Ubuntu-24.04                    Ubuntu 24.04 LTS
openSUSE-Tumbleweed             openSUSE Tumbleweed
openSUSE-Leap-16.0              openSUSE Leap 16.0

方法2)

wsl --version

結果

WSL バージョン: 2.7.0.0
カーネル バージョン: 6.6.114.1-1
WSLg バージョン: 1.0.71
MSRDC バージョン: 1.2.6676
Direct3D バージョン: 1.611.1-81528511
DXCore バージョン: 10.0.26100.1-240331-1435.ge-release
Windows バージョン: 10.0.26200.7462

結果画面は各自の環境にて結果は異なります。
結果が表示されたのであれば、インストールは成功しています。

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