Last active
April 21, 2024 15:44
-
-
Save manoj-choudhari-git/fa3bda9c51b095ef00e91cc33dc2a41a to your computer and use it in GitHub Desktop.
PowerShell script to install WSL 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# STEP 1: Enable Virtual Machine Platform feature | |
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart | |
# STEP 2: Enable WSL feature | |
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart | |
# STEP 3: Restart Win 10 Machine | |
# STEP 4: To set the WSL default version to 2. | |
# Any distribution installed after this, would run on WSL 2 | |
wsl --set-default-version 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment