aum Posted August 8, 2021 Share Posted August 8, 2021 Installing Windows Subsystem for Linux (WSL) was previously too complicated. You need to install multiple packages and turn on multiple settings to get WSL working on Windows 10. Not anymore! Microsoft has now simplified the WSL installation process!! You can install Windows Subsystem for Linux with single command in Windows 10 version 2004 and higher. Craig Loewen, program manager of Windows developer platform, has revealed that this functionality is officially available in the latest Windows Insider Preview builds. To avail this single command WSL installation feature, your system must be running Windows 10 version 2004 or higher, and have the KB5004296 update installed. Install KB5004296 update in Windows Go to Windows update center and click "Check for Updates" button. You might see an available optional quality update. Make sure it has the same number as KB5004296 as shown in the below screenshot. Click Download and Install button to apply this update. Install KB5004296 update in Windows After installing the update, reboot your Windows system to apply the changes. If you have outdated Windows system, you may not see the above update in the first time. First, you need to download and update all available updates in your Windows 10 or 11 system and reboot it to apply all the updates. Update Windows OS And then once again click the "Check for Updates" button. This time you might see KB5004296 update. Install it and reboot your system. Install Windows Subsystem for Linux with single command Now, open Command prompt with administrator privilege. To do so, right click on the command prompt and choose Run as administrator option. Run command prompt as administrator in Windows From the command prompt, run the following command to install Windows Subsystem for Linux: wsl --install This command will automatically enable the required WSL optional features, install the Ubuntu Linux distribution by default, and install the latest WSL Linux kernel version in your machine. Install Windows Subsystem for Linux with single command in Windows Once the Ubuntu installation is completed, reboot your system. As you may noticed, WSL will download and install Ubuntu Linux by default If no option is specified. You can also install other Linux distributions as well. To view the list of WSL supported Linux distributions, run the following command in PowerShell or Windows Command Prompt.: wsl --list --online You will get the list of available Linux distributions to install. List available Linux distributions in WSL To install a specific Linux operating system with WSL, use -d option like below: wsl --install -d <DistroName> Replace <DistroName> with the name of the Linux distribution from the previous list. Example: wsl --install -d Debian Here is a few more commands to manage WSL and installed Linux distributions. Update the WSL Linux kernel manually: wsl --update Roll back to the previous WSL kernel version: wsl --update rollback Display the general information about the status of the Windows Subsystem for Linux installation: wsl --status This command will displays the details such as default distribution type, default distribution, and kernel version etc. For more details, check WSL help section: wsl --help This will display WSL help manual with list of WSL commands and options. Conclusion The recent feature update to install WSL with single command is very useful to someone who wants to quickly setup WSL on a Windows machine. Microsoft dev team has just made it very easier to install Windows Subsystem for Linux in Windows 10 and 11 operating systems. Resource: Microsoft Devblog Source Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.