← すべてのガイド
Managing multiple WSL distros
Install and switch between several Linux distributions side by side under WSL2 -- useful for testing across distros, or keeping a clean distro per project without them interfering with each other.
このガイドは上記リンク先にあるManaging multiple WSL distros公式ドキュメントをもとに作成されています。ディストリビューションやプロジェクトのバージョンは時間とともに変わるため、本番サーバーでこれらのコマンドを実行する前に、必ず公式ドキュメントで正確なパッケージ名・バージョン名を確認してください。
1List distros available to install
wsl --list --online2Install additional distros
wsl --install -d Debianwsl --install -d kali-linuxEach installs as a fully separate environment -- files, packages, and configuration in one distro never affect another.
3List installed distros and set a default
Plain `wsl` with no arguments launches whichever distro is set as default.
wsl --list --verbosewsl --set-default Ubuntu4Launch a specific distro directly
wsl -d Debian5Remove a distro you no longer need
wsl --unregister kali-linuxThis permanently deletes that distro's entire filesystem -- back up anything inside it first.