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

Image of AssemblyAI

Automatic Speech Recognition with AssemblyAI

Experience near-human accuracy, low-latency performance, and advanced Speech AI capabilities with AssemblyAI's Speech-to-Text API. Sign up today and get $50 in API credit. No credit card required.

Try the API

Top comments (0)

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay