How to install Windows Subsystem for Linux

The Windows Subsystem for Linux is a compatibility layer that enables you to run Linux applications natively on Windows 10 and Windows Server 2019. Well done, Microsoft!

You can choose any of the following distributions to run, including Ubuntu 16.04 LTS, Ubuntu 18.04 LTS, OpenSUSE Leap 15, OpenSUSE Leap 42, SUSE Linux Enterprise, Server 12, SUSE Linux Enterprise Server 15, Kali Linux, Debian GNU/Linux, and more.

Windows Subsystem for Linux (WSL) Tutorial & How To

How do you enable Windows Subsystem for Linux?

You can enable Windows Subsystem for Linux using the Windows Control Panel or use Windows PowerShell. Either of these options will require elevated Administrator permissions. It will also possibly need you to restart your computer.

Control Panel:

Open Control Panel -> Programs and Features -> Turn Windows Feature on or off -> Check Windows Subsystem for Linux

See the following example screenshot:

Enable Windows Subsystem For Linux Via  Windows Control Panel


Run the following command:

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

See the following example screenshot:

Enable Windows Subsystem For Linux Via  Windows Power Shell

How do you install Windows Subsystem for Linux?

You can do this via the Microsoft App Store or via Windows PowerShell.

App Store:

Open the Microsoft Store and choose your Linux distribution. Find your Linux distribution in the store by searching for: ‘Run Linux on Windows’. 

Microsoft App Store Run Linux On Windows

Alternatively, you can use one of the following popular distributions:

Click the ‘Get’ button once you have decided on the Linux distribution of your choice.


First, you will need to download your favorite distribution. The following example downloads Ubuntu 18.04:

Invoke-WebRequest -Uri -OutFile Ubuntu.appx -UseBasicParsing

The Invoke-WebRequest command will download the file to the folder from where you ran the command. In most cases, the default folder will be your user folder.

Next, you need to use the Add-AppxPackage command, which will install your Linux distribution. The following example will install the appx file called Ubuntu.appx from the previous PowerShell step.

Add-AppxPackage .\Ubuntu.appx

The following screenshot shows the steps to install Ubuntu 18.04 in PowerShell:

PowerShell Invoke WebRequest and Add AppxPackage to Enable Windows Subsystem for Linux

How do you run your Linux distribution for the first time?

You should see the Linux distribution you installed as an available app in the Windows start bar.

Open the app and then follow the instructions on the screen. You will be asked to enter your preferred default Linux username. The username does not need to be the same as your Windows user. You will also be asked to enter a password for this user. 

See an example of the process below:

Setup Ubuntu on Windows subsystem for Linux for the first time

You can now run and install all your favorite Linux apps! 

How do you access your local Windows folders?

Use the cd command to go to the ‘/mnt’ folder in Linux. All your drives will be mounted into this folder using 777 permissions. 

The example below shows a computer with both a C: and a D: drive:

Access your local Windows folders in Linux

How do you update your Linux packages?

You may get the following message if you try to install a package:

Package XXX is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or is only available from another source

You can get around this by updating your available Linux packages by running: sudo apt-get update (Ubuntu).

You may also be interested in

About the Authors

Anto's editorial team loves the cloud as much as you! Each member of Anto's editorial team is a Cloud expert in their own right. Anto Online takes great pride in helping fellow Cloud enthusiasts. Let us know if you have an excellent idea for the next topic! Contact Anto Online if you want to contribute.

Support the Cause

Support Anto Online and buy us a coffee. Anything is possible with coffee and code.

Buy me a coffee

About Anto Online

Having started his career in 1999 as a Desktop Support Engineer, Anto soon changed paths and became a developer. After several years of development experience, he transitioned into a consultant. As an enterprise application consultant for a leading SaaS software provider, Anto specializes in AWS's serverless technologies. By day, Anto focuses on helping customers leverage the power of serverless technologies. By night, he indulges his passion for cloud computing by playing with Python and trying out things that are currently beyond the scope of his work. Sometimes Anto needs help as there are not enough hours at night. So Anto relies on a team of fellow Cloud enthusiasts to help him out. Each one is a Cloud expert in their own right, and Anto takes great pride in helping them learn and grow.

View all posts by Anto Online →

Leave a Reply

Your email address will not be published.