How to test Ubuntu Focal Fossa on WSL: Sideload a fresh build

Side-load an image of Focal Fossa on WSL to test the upcoming 20.04 LTS release of Ubuntu.

How to test Ubuntu Focal Fossa on WSL: Sideload a fresh build

There are two primary ways to try Ubuntu Focal Fossa, the codename for the release which will become Ubuntu 20.04 LTS (long term support). You can make a copy of your existing installation and upgrade it or you can download and side-load a fresh image from Canonical's daily builds. Both methods need testing and we welcome feedback on.

Sideload a fresh build

We will download a daily build of rootfs from the Ubuntu server and import it.

This will give you the ability to switch back and forth between your working installation and Focal.

It will not bring over any of your existing applications or dotfiles. It is a fresh start.

Open Command Prompt and run the following to see your existing WSL distro:

wsl.exe --list --all --verbose

You can see above we have Ubuntu installed as our WSL distro and and it is running on WSL 2.

Run your existing WSL distro:

ubuntu.exe

Change to a download folder on Windows (your username will vary):

$ cd /mnt/c/Users/Hayden/Downloads

Then use wget on WSL to download our rootfs tar file from the Ubuntu cloud image server:

$ wget https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64-wsl.rootfs.tar.gz

Note:: If you are on arm64, use: https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-arm64-wsl.rootfs.tar.gz

Exit your WSL environment and return to the Command Prompt:

$ exit

Then import your new file into WSL:

On WSL1:

wsl.exe --import UbuntuFocal C:\UbuntuFocal Downloads\focal-server-cloudimg-amd64-wsl.rootfs.tar.gz

On WSL2:

wsl.exe --import UbuntuFocal C:\UbuntuFocal Downloads\focal-server-cloudimg-amd64-wsl.rootfs.tar.gz --version 2

Explanation:

wsl.exe --import <name of your new distro> <path to store the file system> <path to tar.gz file>

And on systems with WSL 2 you can add --version 2 to ensure it is imported as WSL 2 if you have not set wsl.exe --set-default-version 2.

Then verify by running again:

wsl.exe --list --all --verbose

Boot the new image:

wsl.exe -d UbuntuFocal

This will drop you in as root.

Check we are on Focal:

$ cat /etc/os-release

To create a new default user, use:

$ adduser hayden

To give this user the ability to run sudo, add them to the sudo group:

$ usermod -aG sudo hayden

Finally, exit your Focal WSL distro:

$ exit

And re-enter as your new user:

wsl.exe -d UbuntuFocal -u hayden

This command also runs from your existing Ubuntu install:

You can now:

$ sudo apt update ; sudo apt upgrade

and get the latest packages released in just the last few hours:

Did you encounter any issues? How to test Ubuntu Focal Fossa on WSL: Reporting Bugs

Would you prefer to upgrade your existing installation? How to test Ubuntu Focal Fossa on WSL: Upgrade an existing installation