Testing WSL2

Hey there,

I wanted to give WSL2 a try, for that I had to install Win10. I took some notes and I’m sharing them here in case it’s useful to others.

The steps assume you already have a windows subscription/licences you can use.

= Windows Partition =

I had a testing partition with an Ubuntu install before starting which I used for windows. You best repartition/resize from an Ubuntu liveCD before starting if needed, the custom partitioning on the windows installer didn’t seem to propose the option to resize linux partitions.

= Windows Insider =

To access WSL2 you need to opt in to be an insider
https://insider.windows.com , sign in with your microsoft account and activate

= Download the ISO =

https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewiso

I’ve picked amd64(right!)/english/18912 , the webpage gave some error/faq reference at first but it worked after retrying a few minutes later.

(other reported that you can install a non insider version and opt in to the insider channel later on)

= Write the ISO =

The file is a bit less than 5G, I used a 8G key which was enough.

I didn’t manage to get the write the ISO with our “standard” tools and get it to boot (e.g doing a “restore image” from gnome-disks result in the inspiron laptop I used to not list the key as a boot device)

Mounting the iso from gnome-disks/nautilus and copying the content to a fat32 format key worked for others though.

Since that was not working for me I ended up using ‘woeusb’ which is what the internet recommends, you can easily install it from that ppa, https://launchpad.net/~nilarimogard/+archive/ubuntu/webupd8

= Boot the key/installing windows =

(My bios is configured in uefi mode, secure boot disabled, not sure if that makes a difference.)

Booting the key and going through the installation was straight forward.
After installation I got asked for my microsoft account email/password, no other key/ID was required.
Some extra clicks and I had a working win10 desktop

= Install WSL =

https://docs.microsoft.com/en-us/windows/wsl/install-win10 has the details

Basically access PowerShell as admin (typing in the panel search entry find it without issue, admin option is on the right)
$ Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
-> reboot

Go to the win store (icon in the panel as well), search for "ubuntu’, I installed 18.04

= Enable WSL =

https://docs.microsoft.com/en-us/windows/wsl/initialize-distro

You just need to click ‘launch’ after the install. It took like 10 minutes for me which felt a bit long, then asked for username/password and it was enabled.

= Update windows =

The current ISO was not new enough so I had to update Windows

Go to settings
-> Windows Insider Program section

Log in into your microsoft account again from there to be able to change the setting to the most uptodate channel
-> Windows Updates
here the status was ‘getting things ready’, then it installed the update, that took quite some time (at least an hour)

= Enabled WSL2 =

https://docs.microsoft.com/en-us/windows/wsl/wsl2-install
$ wsl --set-version Ubuntu-18.04 2

You can now start Ubuntu from the windows menu again and get a WSL2 command line with Ubuntu!

4 Likes