How to Install Ubuntu 20.04 on WSL

ℹ️Update, August 2026: Ubuntu 20.04 LTS reached the end of its standard support in 2025. The steps below work the same for current releases, install Ubuntu-24.04 instead: wsl --install Ubuntu-24.04.
🐧Part of the WSL Complete Guide, every Windows Subsystem for Linux post on this site, organised by task.

This guide shows how to install Ubuntu 20.04 on WSL (Windows Subsystem for Linux). Before installing a WSL Linux distribution you should have already enabled WSL on your computer.

All WSL Linux distributions are available for download in the Microsoft Store. This is the easiest way to install a WSL Linux distro. If you are automating WSL installations, you may be looking for the WSL distro download links and PowerShell install command.

This post contains the following methods to get Ubuntu installed on WSL:
> Install WSL Ubuntu 20.04 via Microsoft Store
> Install WSL Ubuntu 20.04 via Command

Install WSL Ubuntu 20.04 via Microsoft Store

You can find all the available WSL Linux distributions in the Microsoft Store available for download. This may be restricted by Group Policy if you’re on a Domain (a work/corporate computer).

Click Start, open the Microsoft Store and simply search for the Ubuntu distribution version you desire.

Microsoft Store Ubuntu WSL

Click to download/install Ubuntu WSL, and then go ahead and install Windows Terminal while you’re at it.

Windows Terminal Microsoft Store

Once both of the above installs are complete, search and run Windows Terminal, then enter Ubuntu by running wsl in the terminal.

Open WSL Ubuntu

Install WSL Ubuntu 20.04 via Command

Since this post was written, WSL gained a one-command install, and that is the route to take unless the machine cannot reach the Microsoft Store. Ask WSL what is on offer, then install one by name:

# list the distros available to install
wsl -l -o

# install one, using its NAME value from that list
wsl --install Ubuntu-24.04

The NAME column is what --install takes, and it is the same name you hand to wsl -s later when setting your default distro.

The manual route below is still worth knowing. It works where the Store is blocked by Group Policy, and it leaves you holding an installer file you can carry to another machine. To do it that way, we download the WSL Linux distro and then extract/install it.

Microsoft keeps the downloadable packages, and the direct links for them, on its manual installation page. The set of distributions on offer changes, so wsl -l -o above is the list to trust rather than any copy of it.

We are installing Ubuntu 20.04 in this demo, manually via a web browser rather than PowerShell Invoke-WebRequest or Curl.

Downloading the Ubuntu 20.04 appx package manually in a web browser

Move the downloaded file into some directory.

The downloaded Ubuntu 20.04 appx file shown in Windows File Explorer

Now into the directory within PowerShell, rename the file from .appx to .zip format.

# rename Ubuntu appx file to zip format
# add-appxpackage doesn't always work, extracting the .exe seems better
Rename-Item .\Ubuntu_2004.2020.424.0_x64.appx .\Ubuntu_2004.zip
Renaming the Ubuntu appx package to .zip in PowerShell with Rename-Item

Extract the zip file into a new directory.

# extract the zip file into a new dir
Expand-Archive .\Ubuntu_2004.zip .\Ubuntu_2004
Extracting the Ubuntu 20.04 zip archive in PowerShell with Expand-Archive

Run the ubuntu2004.exe file within the extracted directory and follow the setup instructions to create a new Linux login.

Running ubuntu2004.exe to install the distro and create a new Linux login

Once done wsl should be waiting for you.

First login to the newly installed Ubuntu 20.04 distribution in WSL

Lastly, I’m now exiting (‘exit’ command) out of WSL, listing out my Linux distros and setting this Ubuntu 20.04 distro as my default.

Listing WSL distributions and setting Ubuntu 20.04 as the default

Related

If SQL Server is part of your day job, my current work lives over at sqldba.blog: production DBA scripts, an error library and the SSMS guide.


Looking for SQL Server?

This site started as a SQL Server blog in 2017 and the archive is still here. The new SQL Server writing, and all the scripts, moved to a site of their own.

sqldba.blogScripts, error library, wait types, SSMS
Browse by topic