Guest Craig Loewen Posted October 24, 2021 Posted October 24, 2021 In the latest Windows Insider Preview builds, you can install everything you need to run WSL just by running [iCODE]wsl.exe --install[/iCODE]. We’re excited to announce that this functionality is now officially backported to Windows 10 version 2004 and higher, which will make installing WSL on those builds much easier! [HEADING=1]Using [iCODE]wsl --install[/iCODE][/HEADING] 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, simply open a command prompt window with admin privileges and run [iCODE]wsl.exe --install[/iCODE]. 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. Additionally, you can find a list of Linux distributions available to install by entering the command [iCODE]wsl --list --online[/iCODE] in PowerShell or Windows Command Prompt. To install a distribution other than, or in addition to, the Ubuntu default, use this command: [iCODE]wsl --install -d <DistroName>[/iCODE] Replace [iCODE]<DistroName>[/iCODE] with the name of a Linux distribution found in the previous list command. This install command can be used for first time installation or for adding additional distributions after you already have WSL installed with the default Ubuntu distribution. [HEADING=2]Additional commands[/HEADING] We’ve also included some additional commands to help you manage your WSL instances with this backport. You can use [iCODE]wsl --update[/iCODE] to manually update your WSL Linux kernel, and you can use [iCODE]wsl --update rollback[/iCODE] to rollback to a previous WSL Linux kernel version. Lastly, you can use [iCODE]wsl --status[/iCODE] to see general information about your WSL configuration, such as default distro type, default distro, and kernel version. [HEADING=1]Update your Windows 10 version to support these commands[/HEADING] You can get this backport just by updating Windows like normal. To manually do this open Windows Settings, go to ‘Updates and Security’ and hit ‘Check for Updates’. This update is part of KB5004296 and you can find full instructions on how to ensure you have it installed and its changes here. At the time of writing, when you click “Check for Updates” you might see an available optional update, ensure that it has the same number as KB5004296, install it, and you’ll get access to [iCODE]wsl --update[/iCODE]. [HEADING=1]Where to give us your feedback[/HEADING] As always, you can follow up with WSL team members, or with me on Twitter. If you’re experiencing technical issues please file them on the Microsoft/WSL Github repo. Learn more about WSL, including how to set up common development tools like Git, VS Code, Docker containers, databases, GPU acceleration for machine learning, and more, by visiting the WSL documentation. Happy coding! The post Install WSL with a single command now available in Windows 10 version 2004 and higher appeared first on Windows Command Line. Continue reading... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.