install wsl 2 ubuntu windows 10 code example
Example 1: How to Install WSL2
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
wsl --set-default-version 2
Example 2: wsl 2 reboot ubuntu
Get-Service LxssManager | Restart-Service
Example 3: wsl2 ubuntu
wsl.exe --set-version Ubuntu 2
Example 4: install wsl2
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi
wsl --set-default-version 2
Example 5: ubuntu wsl windows 10
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Example 6: powershell set wsl 2
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart