LoginSignup
0

More than 1 year has passed since last update.

WSLの環境を別名で複数作る

Last updated at Posted at 2022-06-11

WSLの環境を複数作りたい、もしくはWSLの複製を作りたい場合の方法

いちどwsl.exeexportでtarファイルに出力してから import します。

# ディストリビューションの一覧を表示
PS> wsl.exe -l -o
インストールできる有効なディストリビューションの一覧を次に示します。
'wsl --install -d <Distro>' を使用してインストールします。

NAME            FRIENDLY NAME
Ubuntu          Ubuntu
Debian          Debian GNU/Linux
kali-linux      Kali Linux Rolling
openSUSE-42     openSUSE Leap 42
SLES-12         SUSE Linux Enterprise Server v12
Ubuntu-16.04    Ubuntu 16.04 LTS
Ubuntu-18.04    Ubuntu 18.04 LTS
Ubuntu-20.04    Ubuntu 20.04 LTS

# Ubuntu-20.04をcopyしてtestUbuntuを作成
PS> wsl.exe --export Ubuntu-20.04 test.tar

PS> wsl.exe --import testUbuntu testUbuntu test.tar
PS> del test.tar

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