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

More than 1 year has passed since last update.

WSLでLinux環境を構築

Posted at

備忘録

インストール

CUIベースとGUIベースの両方を記載する。

CUI

1. 管理者としてコマンドプロンプトを開く。

2. デフォルトのWSLバージョンを変更する。標準は「2」なので、<バージョン>に2を指定する。

wsl.exe --set-default-version <バージョン>

3. インストール可能なLinuxディストリビューション名を調べる。

wsl.exe -l --online

4. Linuxディストリビューションをインストールする。

wsl.exe --install -d <WSLディストリビューション名>

GUI

1. Microsoft Storeを開く。

2. Linuxで検索する。

3. Linuxディストリビューションをインストールする。

初期設定

Linuxのユーザー名とパスワードを設定する。

ユーザー名に利用できる文字は、半角アルファベット(ASCII文字)小文字と数字、「(アンダーバー)」と「-(ハイフン)」である。
ユーザー名の先頭は、「
(アンダーバー)」にすることは可能だが、数字や「-(ハイフン)」にすることはできない。

Windows OS側と一致させる必要はなく、適当にユーザー名を決めてよい。

VSCodeの設定

Visual Studio CodeにRemote WSLの拡張機能をインストールして、リモートエクスプローラーで選択する

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