- 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:
-
Open Start on Windows 10.
-
Search for Command Prompt, right-click the top result, and select the Run as administrator option.
-
Type the following command to install the WSL and Ubuntu Linux on Windows 10 and press Enter:
wsl --install
-
(Optional) Type the following command to install Ubuntu if you already have WSL installed, and press Enter:
wsl --install -d Ubuntu
-
(Optional) Type the following command to view all the available distros and press Enter:
wsl --list --online
-
(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
-
Restart your computer to finish the WSL and Ubuntu installation.
-
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:
-
Open Start.
-
Search for Turn Windows Features on or off and click the top result to open the Windows Features settings.
-
Check the “Virtual Machine Platform” option.
-
Check the “Windows Subsystem for Linux” option.
-
Click the OK button.
-
Click the Restart now button.
-
Click the “Get in Store app” button.
-
Click the Install button.
-
Open the Ubuntu store page. For example, “Ubuntu 22.04 LTS.”
-
Click the “Get in Store app” button.
-
Click the Install button.
-
Click the Open button to start Ubuntu on Windows 10.
-
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.