How to install Linux OS on your Windows system using  WSL

How to install Linux OS on your Windows system using WSL

TL;DR ?

  1. Run Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux in your powershell (as administrator)
  2. Restart your PC
  3. Run wsl --install Enjoy🤝

What is WSL ?

WSL is an acronym for Windows Subsystem for Linux. Which allows you to run Linux commands on your system. To install WSL on your windows system, follow this guide:

Step 1: First Enable WSL in settings

Open control panel on your system and click on "Programs" 1.PNG Under "Programs and Features", click on "Turn Windows features on and off"

2.PNG

Select "Windows Subsystem for Linux" and click ok 3.PNG Click on restart now button

You can also do this by running this command in your powershell( run as administrator)

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

Step 2: Download and Ubuntu (or any other Linux OS) on your WSL

You can do this in two ways

Method 1: By running this command on your terminal as admin

    wsl --install

NB: This will install Ubuntu for you by default

Method 2: Downloading from Microsoft store

  1. Follow this link to download Ubuntu
  2. Install and Launch
  3. After installing, create a new username and password

Also download Windows Terminal for better experience.

You can now run any Linux command on your system 😁

Ran into to error during installing ?

Make sure virtualization is enabled on your system

Reference list: Microsoft doc Windows central