3 Installing Ubuntu

You can install any distribution you like, but for this tutorial I’ll stick with the latest Ubuntu 20.04.

R and R Studio server exist for all major distributions, even if your distribution doesn’t have a package manager to install R and R Studio Server you can build them from source (I have never done it before but it exists).

3.1 Download Ubuntu from the Windows Store

Download Ubuntu

This is quite straightforward : Windows Store provides a sample of major Linux distributions, some custom distributions may not be free for download but Ubuntu is free. Just click on Install. It will download the OS. When the installation finishes it will ask you to provide valid UNIX username and password. That’s all you need.

3.1.1 Case when you previously have a Linux distribution running WSL 1

Let’s suppose this is not the first time you use WSL and you have a functional distributions you installed with WSL 1. it is possible to convert that distribution to WSL 2 using that commands :

Close all the instances of that distribution before you proceed.

# First list the names of the installed distributions 
wsl --list 

# Pick the name of the distribution and execute 
wsl --set-version <distribution name> 2

Replace <distribution name> with the name of your distribution.