Microsoft just made it even easier to install Windows Subsystem for Linux in Windows 11 (and 10)
Windows Subsystem For Linux has evolved hugely over the years, and with WSL2 things have become really impressive. But in order to enjoy everything the WSL2 has to offer, you have to have it installed, and this is something that Microsoft has acknowledged as being unnecessarily complicated.
So the company has done something about it. In the latest preview builds of Windows 11 and Windows 10, you do not need to jump through endless hoops to get WSL2 installed; a single command is now all it takes.
See also:
- Users already have problems with the Windows 11 beta
- Windows 11 already accounts for more Windows installations than you might expect
- Microsoft says it will not be possible to bypass Windows 11 system requirements
In a post on the Windows Command Line blog, program manager for the Windows Development Platform, Craig Loewen, explains: "The process to set up WSL was previously too complicated, involving turning on multiple settings and installing multiple packages. We’ve simplified the process down to just one command".
He goes on to reveal how the process works:
Simply open a command prompt window with admin privileges and run
wsl.exe --install
. Once you hit enter, the process will automatically enable the WSL optional features required, install the Ubuntu distribution by default, and install the latest WSL Linux kernel version onto your machine. When it’s completed and you restart your machine, your distribution will start after you boot up again, completing the installation.
There are some other commands worth noting here too. They can be used in PowerShell or Windows Command Prompt:
wsl --list --online
displays a list of available Linux distros
wsl --install -d <DistroName>
installs a distro other than Ubuntu
wsl --update
manually updates the WSL Linux kernel
wsl --status
displays general WSL configuration information
You need to be running Windows 10 version 2004 or higher, and have the KB5004296 update installed to take advantage of this new single command WSL installation procedure.
Check out the full blog post here.