Enable WSL2 and Virtual Machine Platform
Open PowerShell as Administrator
Section titled “Open PowerShell as Administrator”- Press the Windows key and type
PowerShell - Right-click Windows PowerShell (or Terminal (Admin)) → Run as administrator
- If User Account Control appears, click Yes
- Confirm the window title bar says Administrator — commands will not work correctly in a standard (non-admin) window
Enable Required Windows Features
Section titled “Enable Required Windows Features”Copy and paste both commands into the elevated PowerShell window:
# Enable Windows Subsystem for Linuxdism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
# Enable Virtual Machine Platformdism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestartExpected: Each command prints The operation completed successfully.
If you see an error about the feature not being found, confirm you are on Windows 10 build 19041+ or Windows 11.