Wonder why no one thought of this before! The Windows Subsystem for Linux, now in its second iteration as WSL2, has evolved a lot over the years. It is now an impressive little solution for developers.
But, in order for you to enjoy everything this Linux based platform has to offer, you have to go through a somewhat tedious installation process. There is room for improvement there, and Microsoft had acknowledged the procedure being unnecessarily complicated.
Naturally, something had to be done.
And the company has done it.
You do not need to jump through endless hoops to get WSL2 installed on your Windows 10 system or the latest preview build of the upcoming Windows 11. A single command is now all it takes for it to be deployed.
As outlined in the Windows Command Line Blog, the process now works by simply opening a command prompt window with administrator privileges and running the wsl.exe –install command. Once you hit the Enter key, the process will complete automatically.
The WSL optional features required will be installed, the Ubuntu distribution will be deployed by default, and a quick boot up of your system should complete the installation.
Of course, there are a bunch of other commands available for you here, as well. These mostly center around changing the Linux distro, manually updating the Linux kernel and all that good stuff that goes over in the neighbor operating system.
You need to be running Windows 10 version 2004 or higher, with the KB5004296 update deployed, to take advantage of this new single command WSL installation.
If only, live were this easy!