You can now install WSL with a single command on Windows 10 version 2004+

Debian Wsl Icon

Microsoft has updated Windows 10 with a new capability. WSL users can now install Windows Subsystem for Linux (WSL) with a single command, wsl --install. This command is one of the improvements included in the second version of WSL.

It was already available to Insiders for long, but finally comes to the stable releases. Microsoft first announced this way of WSL feature enablement back in September 2020.

If you are not familiar with Windows Subsystem for Linux (WSL), it is a special compatibility layer that allows running Linux apps natively, without installing virtual machines or similar software. However, it still require you to open a WSL console session in a command prompt or Windows Terminal.

Initially, WSL was limited to console apps, targeting web devs. But in recent versions of WSL, Microsoft allows running Linux GUI apps. Also, initial Linux support in WSL was limited to Ubuntu, but now you can install plenty of other mainstream distros right from Microsoft Store, or using the mentioned wsl --install command.

A new announcement in the official Command Line blog encourages users to get one of recent Windows 10 versions to get their hands on full power of WSL. The "--install" switch is now available in all Windows 10 releases starting with version 2004. The new capability is part of KB5004296, a Preview update released on July 2021.

Open Windows Settings (Win + I), click on Update&recovery > Windows Update, and click “Check for Updates”. You will see an available optional update KB5004296, Install it, and you’ll get access to the newer WSL version.

After that, issue the command wsl --update to install the latest Linux kernel. It will give you the option to run the following commands:

  • wsl --list --online - lists Linux distributions available to install from the Microsoft Store.
  • wsl --install -d <DistroName> - installs the specified distro.
  • wsl --update rollback - restore the previous Linux kernel version.
  • wsl --status - shows some general info about your WSL settings, including your default WSL distro, kernel version, and more.


Support us

Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:

If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!

Author: Sergey Tkachenko

Sergey Tkachenko is a software developer who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube.

2 thoughts on “You can now install WSL with a single command on Windows 10 version 2004+”

Leave a Reply

Your email address will not be published.

Exit mobile version
Using Telegram? Subscribe to the blog channel!
Hello. Add your message here.