How to install Ubuntu via WSL on Windows 10

Here are two ways to install Ubuntu on Windows 10 through WSL.

Windows 10 install Ubuntu
Windows 10 install Ubuntu
  • To install Ubuntu on Windows 10, open Command Prompt (admin) and run the wsl --install command to install the latest version.
  • Or run the wsl --install -d UBUNTU-VERSION to install a specific version of Ubuntu.
  • You can also download and install the latest version of Ubuntu from the Microsoft Store.
  • You don’t need to dual-boot or create a virtual machine when using WSL.

You can install the Ubuntu distribution alongside Windows 10 to run your favorite Linux tools without switching computers or creating a virtual machine. Microsoft is moving to get more developers to code on any platform but using Windows 10 as their main tool. However, for this to happen, the company has partnered with the guys behind Ubuntu Linux (Canonical) to expand the command line toolset on Windows 10.

Although Linux integration into Windows 10 is not included by default, installing Linux distros is not difficult once you set up the Windows Subsystem for Linux 2 (WSL2) platform on your device.

This guide will teach you the steps to install Ubuntu on Windows 10.

Install Ubuntu on Windows 10 from WSL

To install Ubuntu on Windows 10, use these steps:

  1. Open Start on Windows 10.

  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.

  3. Type the following command to install the WSL and Ubuntu Linux on Windows 10 and press Enter:

    wsl --install

    Single command install WSL

  4. (Optional) Type the following command to install Ubuntu if you already have WSL installed, and press Enter:

    wsl --install -d Ubuntu
  5. (Optional) Type the following command to view all the available distros and press Enter:

    wsl --list --online 
  6. (Optional) Type the following command to install a specific version of Ubuntu on Windows 10 and press Enter:

    wsl --install -d UBUNTU-VERSION

    In the command, change “UBUNTU-VERSION” to the name of the version you want to install. This example installs version 20.04:

    wsl --install -d Ubuntu-20.04
  7. Restart your computer to finish the WSL and Ubuntu installation.

  8. Continue with the Linux distro setup as necessary.

After you complete the steps, the Linux distribution will install on your computer.

Install Ubuntu on Windows 10 from Microsoft Store

To install Ubuntu on WSL from the Microsoft Store on Windows 10, use these steps:

  1. Open Start.

  2. Search for Turn Windows Features on or off and click the top result to open the Windows Features settings.

  3. Check the “Virtual Machine Platform” option.

  4. Check the “Windows Subsystem for Linux” option.

    Enable WSL components

  5. Click the OK button.

  6. Click the Restart now button.

  7. Open the WSL store page.

  8. Click the “Get in Store app” button.

  9. Click the Install button.

    Microsoft Store install WSL

  10. Open the Ubuntu store page. For example, “Ubuntu 22.04 LTS.”

  11. Click the “Get in Store app” button.

  12. Click the Install button.

    Microsoft Store install Ubuntu

  13. Click the Open button to start Ubuntu on Windows 10.

  14. Continue with the on-screen directions to complete the setup.

Once you complete the steps, you can start using the Linux terminal on Windows 10 to access apps, such as Git, Ruby, Python, grep, awk, sed, and many more tools. For command reference, you can use this Microsoft documentation page.

About the author

Mauro Huculak is a Windows How-To Expert who started Pureinfotech in 2010 as an independent online publication. He has also been a Windows Central contributor for nearly a decade. Mauro has over 14 years of experience writing comprehensive guides and creating professional videos about Windows and software, including Android and Linux. Before becoming a technology writer, he was an IT administrator for seven years. In total, Mauro has over 20 years of combined experience in technology. Throughout his career, he achieved different professional certifications from Microsoft (MSCA), Cisco (CCNP), VMware (VCP), and CompTIA (A+ and Network+), and he has been recognized as a Microsoft MVP for many years. You can follow him on X (Twitter), YouTube, LinkedIn and Email him at [email protected].