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?

More than 5 years have passed since last update.

WSLのコマンド

0
Posted at

WSLのコマンドを忘れやすいので、メモ。

一覧表示系

No コマンド 意味
1 wsl -l -v すべてのディストリビューションについての詳細情報を表示します。
2 wsl -l --a 現在インストール中またはアンインストール中のものを含めてすべてのディストリビューションを一覧表示します。
3 wsl -l --r 実行中のディストリビューションを表示します。
4 wsl -l --q ディストリビューション名のみを表示します。

実行系

No コマンド 意味
1 wsl -d <ディストリビューション> 指定したディストリビューションを実行します。
2 wsl -t <ディストリビューション> 指定したディストリビューションを終了します。
3 wsl --shutdown 実行中のすべてのディストリビューションを終了します。

インポート・エクスポート

No コマンド 意味
1 wsl --export <ディストリビューション> <ファイル名> ディストリビューションをtarファイルにエクスポートします。標準出力の場合は、ファイル名を - とすることができます。
2 wsl --import <ディストリビューション> <インストール場所> <ファイル名> 指定したtarファイルを新しいディストリビューションとしてインポートします。標準入力の場合は、ファイル名を - とすることができます。

設定系

No コマンド 意味
1 wsl --set-default <ディストリビューション> 既定のディストリビューションを設定します。
2 wsl --set-default-version <バージョン> 新しいディストリビューションの既定のインストールバージョンを変更します。
3 wsl --set-version <ディストリビューション> <バージョン> 指定のディストリビューションのバージョンを変更します。
4 wsl --unregister <ディストリビューション> ディストリビューションの登録を解除します。
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?