Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to create two instance of wsl?

I need two instants of wsl.

  1. wsl1 for cross-platform file system
  2. wsl2 for new features.

Create two instants of wsl.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

According to M.Warren’s answer

The newer wsl command’s import/export feature can readily create copies of a distro without installing any additional tools or using RegEdit. For example

cd C:\Users\MattSlay
wsl --export Ubuntu ubuntu.tar
wsl --import UbuntuRuby .\UbuntuRuby ubuntu.tar
wsl --import UbuntuPython .\UbuntuPython ubuntu.tar
wsl --import UbuntuDotNet .\UbuntuDotNet ubuntu.tar
wsl -d UbuntuRuby

wsl -d launches the distro. If WSL 2 has been installed, then the distro can be converted between versions during –import using the –version option:

wsl --import UbuntuRuby .\UbuntuRuby ubuntu.tar --version 2

Or you can just use this gui tool instead

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading