Score:-1

How to select a specific subsysmtem on WSL?

in flag

Hello I have the following installations on my WSL. I want to 1)select and 2) update the following subsystem: Ubuntu-18.04 enter image description here

Update:

  1. I can run wsl -s Ubuntu-18.04 to select some release
Score:1
vn flag

You can use the -d/--distribution <distroname> option to run a particular instance. So wsl -d Ubuntu-18.04 will start that distribution and allow you to update. Better yet (and undocumented), wsl ~ -d Ubuntu-18.04, since that will start you in your home directory.

The -s that you mentioned is short for --select-default. This changes the default instance so that the next time you run wsl without a -d/--distribution option, the default runs.

There are quite a few useful options documented here, starting with -h/--help which will give you a short overview in the console.

Also, for updating the instance, you can do it in a one-liner with:

wsl -d Ubuntu-18.04 -u root sh -c "apt update && apt upgrade"
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.