Situatie
Windows Subsystem for Linux 2 is now available on Windows 10 with various improvements, and this is how you can install and start using it.
Solutie
To install Windows Subsystem for Linux on Windows 10 2004 or higher, use these steps:
- Open Start on Windows 10.
- Search for Command Prompt, right-click the top result, and select the Run as administrator option.
- Type the following command to install the WSL on Windows 10 and press Enter:
wsl --install
- Restart your computer to finish the WSL installation on Windows 10.
- Continue with the Linux distro setup as necessary.
Once you complete the steps, the required Linux components will automatically install the latest version of the Ubuntu Linux distribution.
Install WSL with specific distro
To install WSL with a specific distro on Windows 10, use these steps:
- Open Start.
- Search for Command Prompt, right-click the top result, and select the Run as administrator option.
- Type the following command to view a list of available WSL distros you can install on Windows 10 and press Enter:
wsl --list --online
Quick note: At the time of this writing, you can install Ubuntu, Debian, Kali Linux, openSUSE, and SUSE Linux Enterprise Server. - Type the following command to install the WSL with a specific distro on Windows 10 and press Enter:
wsl --install -d DISTRO-NAME
In the command, remember to replace “DISTRO-NAME” for the name of the distro you want to install, such as Debian.
- Restart your computer.
- Continue with the Linux distro setup as necessary.
After you complete the steps, the Windows Subsystem for Linux 2 components will install with the distro of Linux you specified.
To update the WSL kernel to the latest version, use these steps:
- Open Start.
- Search for Command Prompt, right-click the top result, and select the Run as administrator option.
- Type the following command to update the WSL kernel and press Enter:
wsl --update
Once you complete the steps, if an update is available, then it will download and install on the device.
If the update command doesn’t work, open Settings > Update & Security > Windows Update > Advanced options, and turn on the “Receive updates for other Microsoft products when you update Windows” toggle switch.
- Enable Windows Subsystem for Linux
If you are not already using Linux on Windows 10, you must enable the Windows Subsystem for Linux (version 1) with these steps:
- Open Start on Windows 10.
- Search for Turn Windows features on or off and click the top result to open the experience.
- Check the “Windows Subsystem for Linux” option.
- Click the OK button.
- Click the Restart button.
Once you complete the steps, you need to enable the Virtual Machine Platform feature.
- Confirm distro platform
To confirm distros are using the Windows Subsystem for Linux 2, use these steps:
- Open Start.
- Search for PowerShell, right-click the top result, and select the Run as administrator option.
- Type the following command to verify the version of the distro and press Enter:
wsl --list --verbose
- Confirm the distro version is 2.
Leave A Comment?