Skip to content

Instantly share code, notes, and snippets.

@manoj-choudhari-git
Last active April 21, 2024 15:44
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save manoj-choudhari-git/fa3bda9c51b095ef00e91cc33dc2a41a to your computer and use it in GitHub Desktop.
Save manoj-choudhari-git/fa3bda9c51b095ef00e91cc33dc2a41a to your computer and use it in GitHub Desktop.
PowerShell script to install WSL 2
# 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