WSL Series 1: Installation of Windows Subsystem for Linux

WSL , or Windows Subsystem for Linux, is a feature that allows you to run Linux distributions natively on Windows via a compatibility layer, it was added in Windows 10 . It allows you to have access to a terminal window where you can do all sorts of things you are allowed to do on Linux. it even allows you to access your Windows drives and run commands on them as we will see in subsequent tutorials.

First things first, let's see how to install WSL v2, as WSL v1 is deprecated.

Prerequisites for installing WSL v2 :

In order to check your Windows version, enter keyboard combination Windows+R and enter winver command, like following :

A window like the following screenshot will appear :

you must have Windows 10 version 2004 or higher (an OS Build greater than or qual to 19041.450). Otherwise, you should update your Windows installation to a more recent version.

Activate Windows options for WSL :

  1. Click on Windows button and tap "Apps & features"

2. Go to Apps & Features, slide down to Programs and features

3. Click on the option Turn Windows features on or off

4. Windows Features interface

5. Slide to the bottom and check the option Windows Subsystem for Linux

6. It will take few moments to apply the changes

7. The system will install it and prompts you to reboot your PC, click restart now

check WSL is installed :

In order to check that you have successfully installed WSL v2, open a power shell window and run following command :

wsl -l -v

Congratulations, WSL has been installed, and the message displays that you don't have any Linux distributions installed yet.

In the next tutorial, we will see how to install a Linux distribution on WSL.

Happy Learning guys !