DEV Community

0 seconds of 3 minutes, 28 secondsVolume 90%
Press shift question mark to access a list of keyboard shortcuts
00:00
00:00
03:28
 
Vigneshwaran Vijayakumar for Winsides

Posted on

3 1 1 1

Video: Enable WSL 2 using CMD and PowerShell

Enable Via Command Prompt:

  • Open Command Prompt as Administrator.
  • Click Yes on the User Account Control.
  • In the CMD, type the following command and click enter.
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
Enter fullscreen mode Exit fullscreen mode
  • WSL 2 requires Virtual Machine Platform; hence, we will enable Windows Virtual Machine Platform using the following command in the CMD.
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Enter fullscreen mode Exit fullscreen mode
  • Restart your System. That is it. WSL 2 is a go!

Enable via PowerShell

  • Open Windows PowerShell as Administrator.
  • Click Yes on the User Account Control.
  • In the PowerShell, type the following command and click enter.
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux -All -NoRestart
Enter fullscreen mode Exit fullscreen mode
  • Also, enable Virtual Machine Platform using the following command.
Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform -All -NoRestart
Enter fullscreen mode Exit fullscreen mode

That is it. Restart your PC. WSL 2 is good to go!

Visit our detailed guide on winsides.com. You can also refer to our YouTube Tutorial

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more