0

Following the advice in

How to get ubuntu 18.04 from windows store if ubuntu and ubuntu 20.04 already installed

I can create multiple instances of WSL distros and run them with the command:

wsl -d foo -u me

Where "foo" is the distribution name and "me" is my user ID. I even can make ones pre-populated with my home directory and the software I want to run. This is very close to what I want. However, I am missing a bit of the functionality one gets if one installs the distribution from the store. In particular, that makes a "foo.exe" file that you can pin to the task bar and use that to open multiple copies of that same distribution just by clicking. I'm looking for a way to create a similar "shortcut" in particular something I can pin to the task bar, drop into a toolbar, or pin to the start menu, or maybe even pin to a context menu.

1
  • Oops - Answered in the comments on the other question, but didn't notice that you'd posted a separate question for it. Commented Jun 28, 2021 at 12:58

1 Answer 1

1

There are a few ways, but here's an easy one:

  1. Create a new Shortcut somewhere (e.g. %userprofile%) pointing to wsl ~ -d foo
  2. That shortcut can be pinned to the Start Menu directly
  3. Launch it
  4. The resulting app window can be pinned on the Taskbar

Side note -- As an alternative, I highly recommend installing Windows Terminal if you are working with multiple WSL distributions. It will auto-detect new distros (even those that are installed with wsl --import) and add a launch profile for each of them.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .