How to install Ubuntu via WSL on Windows 10

  • 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.

Without changing computers or setting up a virtual machine, you may install the Ubuntu distribution in addition to Windows 10 and use your preferred Linux tools. With Windows 10 as their primary tool, Microsoft is working to encourage more developers to write code on any platform. To make this possible, though, the business has teamed up with the creators of Ubuntu Linux (Canonical) to provide more command-line tools to Windows 10.

Installing Linux distributions is simple once you have installed the Windows Subsystem for Linux 2 (WSL2) platform on your computer, even though Linux integration is not built into Windows 10 by default.

This tutorial will walk you through the process of installing Ubuntu on Windows 10.

  • Install Ubuntu on Windows 10 from WSL

  • Install Ubuntu on Windows 10 from Microsoft Store

Install Ubuntu on Windows 10 from WSL

Follow these instructions to install Ubuntu on Windows 10:

Launch Windows 10.

Look up “Command Prompt,” then right-click on the first result and choose “Run as administrator.”

To install Ubuntu Linux with WSL on Windows 10, use the following command and hit Enter:

Single command install WSL

(Selective) If you already have WSL installed, type the following command and hit Enter to install Ubuntu:

(Selective) To see all of the possible distributions, use the following command and hit Enter:

(Selective) To install a particular version of Ubuntu on Windows 10, type the following command and hit Enter:

Change UBUNTU-VERSION to the name of the version you wish to install in the command. Version 20.04 is installed in this example:

To complete the installation of Ubuntu and WSL, restart your computer.

If required, carry on with the Linux distribution configuration.

The Linux distribution will install on your PC once you’ve finished the procedures.

Install Ubuntu on Windows 10 from Microsoft Store

Follow these steps to install Ubuntu on WSL from the Microsoft Store on Windows 10:

LaunchStart.

To access the Windows Features settings, search for “Turn Windows Features on or off” and click the top result.

Examine the selection for the Virtual Machine Platform.

Look for the Linux option in the Windows Subsystem.

Enable WSL components

Press the “OK” button.

Press the button labeled “Restart now.”

Go to the WSLstore website.

The Get in Store app button should be clicked.

On the Install button, click.

Microsoft Store install WSL

Navigate to the Ubuntu Store website. Take Ubuntu 22.04 LTS, for instance.

The Get in Store app button should be clicked.

On the Install button, click.

Microsoft Store install Ubuntu

To launch Ubuntu on Windows 10, click the Open button.

To finish the setup, follow the on-screen instructions.

After completing the instructions, you may begin using the Linux terminal on Windows 10 to access many tools and applications, like grep, awk, sed, Git, Ruby, and Python. This Microsoft documentation page can be used as a command reference.

Leave a Comment