Install WSL2 and Ubuntu on Windows with a single command: wsl –install

We all love WSL2, but the installation process used to have several steps, as we showed here on Azuretar previously. As promised on Microsoft Build 2020 now you can install WSL2 and Ubuntu with a single command. This feature is now available in preview Windows Insider. In the following videos, we will show the wsl --install command in action, on Windows Insider, builds 20241 and 20262/

First attempt on Build 20241

In our first attempt, we tried the command on wsl --install Windows Insider Build 20241.

It has enabled WSL2 and installed the Linux Kernel, which was a big improvment but we had to install a distro manually.

Second attempt on Build 20262

Eventualy, we got the latest Windows Insider Build 20262, at the recording time and we tested again and it worked.

wsl --install enables WSL2, installs the kernel and installs the default distro Ubuntu.

Also, now you can install any distro available on Microsoft store with wsl --install <distro>

To check the available distros type wsl --list --online

After reboot the computer, type wsl on a terminal and wait a few seconds, you will see the distro windows starting the initial setup.

Thanks Microsoft WSL Team to make the WSL install process so easy.

Follow us on Twitter

@azuretar @FernandoRolnik @JorgeArteiro