Setup WSL/WSL2

In this article, I explain how to setup WSL/WSL2 using most simple methods.

WSL can be setup using either GUI or CLI

What is WSL/WSL2 ?

WSL stands for Windows Subsystem for Linux and does exactly what it says. WSL lets developer use full power of linux with dual booting or virtual machines

WSl allows developer to use Linux on top of windows, WSL installs whole linux file system on windows.

Required Windows version

GUI setup

Follow below step to install WSL

  • Open start menu or click ctrl + s
  • Search 'Turn windows feature on and off' and click open
  • Select 'Windows Subsystem for Linux' and 'Virtual Machine Platform' from the menu
  • Click `Ok`
  • It may require a restart to apply changes

Half way done!

  • Now, Open 'Microsoft Store' and search for your favorite distribution (current only few distribution support WSL)
  • I recommend using Ubuntu as canonical collaborated with Microsoft to create WSL
  • Click install
  • Then launch the distribution from 'Microsoft Store' or search on windows start menu
  • follow prompt and that it!

CLI setup

Alternatively you can use powershell or terminal to setup WSL

  • Open `powershell` in administrator mode
  • Run below commands:
  • Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
  • Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform
  • Restart your computer

that it! Further process is same as GUI

  • Now, Open 'Microsoft Store' and search for your favorite distribution (current only few distribution support WSL)
  • I recommend using Ubuntu as canonical collaborated with Microsoft to create WSL
  • Click install
  • Then launch the distribution from 'Microsoft Store' or search on windows start menu
  • follow prompt and that it!
home