Ubuntu 20.04 WSL

If you want to try out the improved Windows Subsystem for Linux 2 (aka WSL ii) in the latest Windows versions hither'south how — nosotros cover everything you demand to exercise to install it in this post.

Don't Miss

Microsoft Demos GUI Linux Apps Running on WSL

WSL ii is a major upgrade over the original version of WSL Microsoft introduced in 2017. More than a mere version crash-land, WSL ii is faster, more than versatile, and uses a existent Linux kernel.

And new Linux kernel updates are released every bit Windows 10 software updates — which is kinda crazy when y'all call back about it!

Microsoft'due south goal in creating WSL 2 is to boost performance. And the best style to do that? Add full system telephone call compatibility, i.e. put a real Linux kernel at the heart of things.

"[This] new compages presents a better platform for the WSL team to evangelize features that make WSL an amazing way to run a Linux surround in Windows," say Microsoft of the tech.

The crazy shows no sign of abating either as Microsoft plans to let users run desktop Linux apps on Windows x and leverage GPU-intensive tasks.

And the best news is that it is much easier to install WSL on Windows 10, as our updated guide shows.

Install WSL two on Windows 10

Ubuntu-WSL-screenshot by Balint Reczey

Requirements

To install WSL 2 on Windows 10 you need:

  • Windows 10 May 2020 (2004), Windows x May 2019 (1903), or Windows 10 November 2019 (1909) or afterward
  • A computer with Hyper-5 Virtualization support

If you have Windows 10 May 2020 (2004) update (or later) installed you can install WSL with a single command. If you don yet have the Windows 10 May 2020 (2004) update there are a couple of boosted steps y'all'll need to become through in order to go things fix.

To utilize WSL your calculator must support Hyper-5 Virtualization. Not sure if yours does? You tin check your Hyper-5 back up manually.

If yous don't encounter these requirements you cannot install or enable WSL 2 only you lot can utilize WSL 1.

Installing WSL 2 on OS Build 2004 (or subsequently)

a screenshot of the windows command prompt and the new wsl install command
Single command easy

to install WSL two on Windows ten Os Build 2004 or later you need to open the control prompt app with Administrator permissions, and enter the following command:

wsl.exe --install

As soon equally you hit enter, the process automatically gets to work. It enables the WSL optional features required, fetches the latest WSL Linux kernel version, and installs Ubuntu equally your default distro:

The process is fast

Once done, reboot and log in to Windows x. The command prompt will open once more and you'll exist walked through setting up Ubuntu with a username and countersign (these don't need to exist the same as your Windows username and password though).

In one case done y'all tin can open up the 'Ubuntu' app from the Commencement Card to become started, or install the Microsoft Concluding app to start exploring your newly-installed Ubuntu install — don't forget to run an apt update && apt upgrade though!

Install WSL 2 (Sometime Method)

If you utilise an earlier version of Windows ten you can still install WSL ii (Microsoft backported WSL 2 to older versions of Windows 10 in Windows Update KB4566116) simply the procedure isn't quite as simple as in the 2004 update.

To install WSL 2 on Windows 10 (OS Build 1909 or 1903) you need to follow 4 steps:

  1. Enable WSL 2
  2. Enable 'Virtual Machine Platform'
  3. Prepare WSL 2 every bit default
  4. Install a Linux distro

I walk through each step in turn beneath. I recommend using the PowerShell app, which yous need to run as an ambassador. You tin find PowerShell in the Windows Start Menu.

Note: it is possible to install WSL one using a GUI besides just it's much faster to utilize the command line, and since WSL is a CLI tool it kinda makes sense also!

Stride 1. Enable WSL

Regardless of which version of WSL you want to apply you lot first need to enable information technology. To exercise this open the PowerShell tool as an Administrator and run the command below. Be careful not to mistype or leave out any graphic symbol in the control:

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

But desire to use WSL 1? Y'all tin skip to step 4.

Footstep 2. Enable 'Virtual Machine Platform'

WSL 2 requires Windows 10's "Virtual Machine Platform" feature to be enabled. This is separate from Hyper-V and hands some of the more than interesting platform integrations available in the new version of the Windows Subsystem for Linux.

To enable Virtual Motorcar Platform on Windows x (2004) open up PowerShell as Administrator and run:

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

To enable Virtual Machine Platform on Windows ten (1903, 1909) open PowerShell as Administrator and run:

Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform -NoRestart

To ensure all of the relevant bits and pieces fall neatly in to place you lot should restart your system at this bespeak or you may find that things don't piece of work equally intended.

Step 3. Gear up WSL two as default

Open up PowerShell as Administrator and run this command to fix WSL 2 as the default version of WSL:

wsl --set-default-version ii

You can (at whatever fourth dimension) configure a distro to run in WSL 1 fashion if you need to.

Pace 4. Install a distro

With WSL and the necessary virtualisation tech all in place all that is left for you to do is option and install a Linux distro from the Microsoft Shop.

Several dissimilar distros are available, including OpenSUSE, Pengwin, Fedora Remix, and Alpine Linux. Only my personal recommendation is (naturally) Ubuntu 20.04 LTS (though 18.04 LTS and 16.04 LTS are besides bachelor).

To install Ubuntu on Windows ten open the Microsoft Store app, search for "Ubuntu twenty.04", and hit the "Go" button:

Ubuntu 20.04 LTS on the Microsoft Store

Whilst yous in the Microsoft Store I highly recommend that y'all as well install the open source Windows Concluding app. This tool is designed to requite you the best possible WSL experience:

Windows Terminal on the Microsoft Shop

5. Use WSL 2

When you lot installed Ubuntu (or a unlike Linux distro) a shortcut was added to the Start Bill of fare. Use this to "open" Ubuntu (or whichever distro yous chose). The offset time y'all run the distro things will seem a little slow. This is expected; the distro has to unpack and decompress all of its contents — just don't interrupt the process.

Yous will also be promoted to gear up a username and password for apply on the distro. Try to pick something y'all won't forget.

Convert Ubuntu on WSL ane to WSL two

If y'all use WSL 1 yous can upgrade an existing WSL i installation to WSL 2. To catechumen an existing WSL 1 distro to WSL 2 run the following in PowerShell, e..g,:

wsl.exe --set-version Ubuntu 2

You should supercede 'Ubuntu' with the name of whichever distro your WSL ane install runs.

Let me know if this guide worked for you lot in the comments!