DEV Community

Cover image for WSL 2.0 - Linux On Windows 10
Vikas Prabhu
Vikas Prabhu

Posted on

WSL 2.0 - Linux On Windows 10


Have kept this article simple and to the point , please share you feedback and love <3

Run all commands in Windows PowerShell with admin rights

  • Enabling the Virtual Machine Platform
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Enter fullscreen mode Exit fullscreen mode
  • Enabling the Windows Subsystem for Linux
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
Enter fullscreen mode Exit fullscreen mode
  • Restart the machine even if it was mentioned /norestart

  • After restart reopen powershell with admin rights

  • Set default WSL version to 2.0

wsl --set-default-version 2
Enter fullscreen mode Exit fullscreen mode
  • It will give you upgrade message like this
WSL 2 requires an update to its kernel component. For information please visit https://aka.ms/wsl2kernel
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
Enter fullscreen mode Exit fullscreen mode
  • Download the standalone update from this site

  • Install the update by double click

  • Search for Ubuntu 20 LTS from app store

  • After installation you should be able to see ubuntu in the start menu

  • Clicking it will open a bash shell

  • All your windows drives will be under /mnt/

  • Search for Windows Terminal from app store for better terminal experience

  • Upgrade your shell to ZSH (not mandatory but just for the love of ZSH)

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Enter fullscreen mode Exit fullscreen mode

Top comments (0)