How to Install WSL (Windows Subsystem for Linux) on Windows 10

How to Install WSL (Windows Subsystem for Linux) on Windows 10

Did you know you can smoothly run Linux applications on Windows 10 with WSL without the need to use any virtualization software or an external device?

That’s what precisely we will handle in this post. Read on and get to know how to set it up.

What is Windows Subsystem for Linux (WSL)

Windows Subsystem for Linux is an additional feature in Windows 10 that enables users to run supported Linux distributions without using virtualization software or setting up a dual-boot as it has been before.

Some of the currently supported Linux distros include Ubuntu, Debian, Kali Linux, Open SuSE, etc.

How WSL works behind the scenes doesn’t use any virtualization or Hyper-V concept. Microsoft developed WSL in a way it can run Linux binaries on a Windows 10 system. You, therefore, don’t need to worry about memory as you would in virtualization.

Objectives

This tutorial will give you a step-by-step guide on installing Windows Subsystem for Linux using the Settings application. We will also show you how to install your first Linux distribution and how to uninstall them when you no longer need to run Linux apps.

Let’s dive in!

How to Install WSL on Windows 10

Step 1. Enable Windows Subsystem for Linux in Windows Features Settings

To get started, we first need to enable WSL on our system.

In the Windows Search bar (Win key + S), search for Turn windows features on or off and hit Enter.

word image 30

That will open the Windows Features settings window. Scroll down and check the box next to Windows Subsystem for Linux to enable WSL on your system. Click OK to apply the changes when done.

word image 31

Windows will search and install some additional files required, and when done, you will see an option to Restart your PC.

Step 2. Install Linux distributions from Microsft Store

After you have successfully rebooted your PC, we can now proceed to install our first Linux distribution.

Launch the Microsft Store App and search for your desired Linux distribution you wish to install, as you would for any other app. You will be required to sign in with your Microsoft account or sign up If you don’t have one.

On the Search button on the top-left corner, type Linux to see all the distributions available for download. Select your distribution of choice.

For this post, we will install Ubuntu 20.04 LTS.

word image 32

Click Get to install the distribution in your system. The download process might take a while, depending on your internet speed. Please be patient.

word image 33

Step 3. Running Linux using WSL

When the installation is complete, you should see a Launch button. Click it to start running Linux on Windows.

Alternatively, type the name of the distribution you just installed in the Windows Search bar (Win key + S) and hit Enter. In my case, I installed Ubuntu 20.04 LTS.

word image 34

That will launch the Linux Terminal on your Windows system. It will download and install some additional files before setting up a new username and password.

word image 35

That’s it!

We have successfully installed Linux on our system using the Windows Subsystem for Linux feature. You can proceed to execute the same commands you run on the basic Linux Terminal. For a start, I would recommend updating the system with the commands below:

sudo apt update
sudo apt upgrade

Tip: How to Solve “The WSL Optional Component is Not Enabled. Please Enable it and Try Again” Error

If, after launching your newly installed Linux distro, you get an error like “The WSL Optional Component is Not Enabled. Please Enable it and Try Again”, follow the steps below to solve the issue.

  1. Ensure that you enabled the WSL feature in the Windows Features window and rebooted your PC to apply the changes.
  2. If you did that, launch Windows Powershell as an administrator and execute the command below:
    Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

    word image 36

  3. When done, reboot your PC and relaunch your Linux distro. Hopefully, you shouldn’t experience this error anymore.

Uninstall Linux from the Settings application and disable WSL

When you no longer need Linux in your Windows 10 system, I recommend removing it and disabling the WSL feature in the Windows Features window.

To get started, launch the Settings Application and select Apps. Select Apps & Features and scroll down to the Linux distribution you installed. In this case, it’s Ubuntu 20.04 LTS. Select the distribution and click Uninstall.

word image 37

When the uninstallation completes, we can now proceed to disable WSL. Type Turn on Windows features on or off In the Windows search bar (Win key + S) and hit Enter. That will open the Windows Features window. Scroll down and uncheck the box next to Windows Subsystem for Linux.

word image 38

You will be prompted to reboot your PC to apply the changes.

Conclusion

I believe this post has given you a detailed guide on how to get started with Linux on Windows 10 using the Windows Subsystem for Linux feature.

For users who want to get started with Linux systems, using WSL would be a good start as it will familiarize you with most of the Linux Terminal commands.

If you come across any issues while carrying out any of the steps above, feel free to leave a comment below or contact us. We will get back to you as soon as we can.

0 Shares:
Leave a Reply

Your email address will not be published. Required fields are marked *

You May Also Like