In #Windows11 I have an app called "Ubuntu"

It brings up a terminal with an Ubuntu bash shell in it

Can I have 2 distinct Ubuntu installations ?

How ?

#wsl
#Windows

@abbienormal
For trying out stuff like that I'd like to have Windows. The only problem is that I only have Windows on my work laptop...

If I'm not mistaken, wsl is some sort of a container mechanism, so I am guessing it should be possible to run the same process on two different containers.

@nadav

But how?

If I launch the app 2 times, I end up with 2 terminals on the same installation

Follow

@abbienormal @nadav

```
mkdir C:\wsl\exports
wsl --export Ubuntu-22.04 C:\wsl\exports\Ubuntu-22.04.tar
mkdir C:\wsl\instances\Ubuntu-22.04-v2
wsl --import Ubuntu-22.04-v2 C:\wsl\instances\Ubuntu-22.04-v2 C:\wsl\exports\Ubuntu-22.04.tar --version 2
```

as administrator.

I expect the idea behind this workaround is quite clear.

To get a shell there, now:

```
wsl -d Ubuntu-22.04-v2
```

Now you also set it as your default WSL2 VM:

```
wsl --set-default Ubuntu-22.04-v2
```

@jonn

Thank you SO MUCH !

I know there are more distros but I'm used to Ubuntu

Sign in to participate in the conversation
Doma Social

Mastodon server of https://doma.dev.