Skip to content

Instantly share code, notes, and snippets.

@farhad-taran
Last active August 2, 2020 12:15
Show Gist options
  • Save farhad-taran/b3de97b1dfb48096bd039a241058c13d to your computer and use it in GitHub Desktop.
Save farhad-taran/b3de97b1dfb48096bd039a241058c13d to your computer and use it in GitHub Desktop.
How to install WSL 2 and Ubuntu

Check that you have latest windows updates that allows WSL 2 and then Open an admin Powershell instance and run the following commands:

  • Enable WSL
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
  • Enable ‘Virtual Machine Platform’
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
  • Set WSL 2 as default
wsl --set-default-version 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment