# Installing Linux on Local Windows Computer
To manage your remote Coop-Cloud Capsule from your local computer, you need to have Linux installed locally. This guide will use the *Windows Subsystem for Linux* for the local Linux kernel and distribution.

What is WSL? To quote from Microsoft's document,
## [What is the Windows Subsystem for Linux?](https://docs.microsoft.com/en-us/windows/wsl/about)

> The Windows Subsystem for Linux lets developers run a GNU/Linux environment -- including most command-line tools, utilities, and applications -- directly on Windows, unmodified, without the overhead of a traditional virtual machine or dualboot setup.

This guide shows how to install and run WSL2 on Windows 10. From the same article,
## [What is WSL 2?](https://docs.microsoft.com/en-us/windows/wsl/about#what-is-wsl-2)

> WSL 2 is a new version of the Windows Subsystem for Linux architecture that powers the Windows Subsystem for Linux to run ELF64 Linux binaries on Windows. Its primary goals are to increase file system performance, as well as adding full system call compatibility

> WSL 2 uses an entirely new architecture that benefits from running a real Linux kernel.

## Frequently Asked Questions
If you have questions about WSL, there's Microsoft's doc [Frequently Asked Questions about Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/faq).

## Bleeding Edge: Graphical Linux programs
If you live your computing life on the bleeding edge, you can get a preview of Windows 11, which allows you to run *graphical* Linux programs. This Microsoft document has the details: [Run Linux GUI apps on the Windows Subsystem for Linux (preview)](https://docs.microsoft.com/en-us/windows/wsl/tutorials/gui-apps).

## Lets Do It!!!
Without further ado, let's get WSL2 installed on Windows 10! This guide is following the instructions from this page: [Windows Subsystem for Linux Installation Guide for Windows 10](https://docs.microsoft.com/en-us/windows/wsl/install-win10)

There are two options available for install, simplified and manual. This guide goes through the six manual steps. **Note:** If you run into problems, there's a [troubleshooting](https://docs.microsoft.com/en-us/windows/wsl/install-win10#troubleshooting-installation) section at the bottom of the Microsoft WSL installation page. ![01](../res/install-wsl2-linux/01.png "01")

1. The first step (of six) is to enable the "Windows Subsystem for Linux" feature, aka the Microsoft-Windows-Subsystem-Linux feature. Open an Administrator PowerShell window and run the dism.exe command as shown. Do **NOT** restart your computer yet.

    > dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

    ![02](../res/install-wsl2-linux/02.png "02")
    ![03](../res/install-wsl2-linux/03.png "03")

1. The second step (of six) is to make sure your computer meets the requirements shown in the screenshot below, **Step 2- Check Requirements for running WSL 2.** The document says you need version 1903 or higher, with Build 18362 or higher.

    You can press Windows logo key + r, type *winver*, press *OK* button, to see your current Windows version and build.

    ![04](../res/install-wsl2-linux/04.5.png)

    If necessary, go to Settings > Update & Security > Windows Update and click *Check for updates* button to install more Windows Updates.
    
    If your computer gets stuck with Windows Updates, this page may help: [Windows Update Assistant](https://www.microsoft.com/software-download/windows10).

    ![04](../res/install-wsl2-linux/04.png "04")

    ***The purple Note at the bottom of the screenshot might be useful.***

1. Step 3 of 6 is enabling the "Virtual Machine" feature. Although you Enabled the Windows Subsystem for Linux feature in Step 1, you also need to enable the VirtualMachinePlatform feature. In an Administrator PowerShell window, run this command:

    > dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

    ![06](../res/install-wsl2-linux/06.png "06")

    ![07](../res/install-wsl2-linux/07.png "07")

    ***RESTART YOUR COMPUTER*** to complete the WSL install:

    ![08](../res/install-wsl2-linux/08.png "08")

1. Step 4 of 6 is to download Microsoft's Linux Kernel Update and install it. Click the link *WSL2 Linux kernel update package for x64 machines* and save the .msi file to disk.

    ![09](../res/install-wsl2-linux/09.png "09")
    ![10](../res/install-wsl2-linux/10.png "10")
After saving the .msi file to disk, find the downloaded file in File Explorer. Double-click the wsl_update_x64.msi installer package to install it.

    ![11](../res/install-wsl2-linux/11.png "11")
    ![12](../res/install-wsl2-linux/12.png "12")
1. Step 5 of 6 is to make WSL2 your default version, instead of WSL being your default version. Run the wsl command shown below. You should see "The operation completed successfully."

    > wsl --set-default-version 2

    ![13](../res/install-wsl2-linux/13.png "13")
    ![14](../res/install-wsl2-linux/14.png "14")

1. Step 6 of 6 is to install your distribution of Linux. In this guide I'll be installing Debian 10 Buster.
    ![15](../res/install-wsl2-linux/15.png "15")
    The web page shows the following listing to various Linux Distributions. Clicking on the link will take you to the Distribution in the  Microsoft Store.
    ![16](../res/install-wsl2-linux/16.png "16")
    You can also view the list of Linux Distributions by running a wsl command:
    > wsl --list --online

    ![18](../res/install-wsl2-linux/18.png "18")

    Pick which Linux distribution you want to install, and either click one of the links on Microsoft's web page, or do a search in the Microsoft Store.

    When you've found your distro in the store, you first need to click the *Get* button and then the *Launch* button.

    If you see a popup window like this, you can close it. You don't need a Windows account to get and install Linux distros from the Microsoft Store.
    ![19](../res/install-wsl2-linux/19.png "19")

    Here's the Debian distro in the store. I've already gotten it once before, so I don't see the *Get* button. I just need to install and launch it.:
    ![20](../res/install-wsl2-linux/20.png "20")
    ![21](../res/install-wsl2-linux/21.png "21")
    Here's the Microsoft page image for Getting and Launching the Ubuntu distro. Note that the first time you launch a Linux distro, it will take a few moments to initialize it.
    ![22](../res/install-wsl2-linux/22.png "22")
    Screenshots of my installation of the Debian distro:
    ![23](../res/install-wsl2-linux/23.png "23")
    You Linux username does not need to be the same as your Windows username.
    ![24](../res/install-wsl2-linux/24.png "24")

Woo hoo! The installation of WSL2 and your Linux distribution is complete.

|  [Previous](inst-docker-on-capsul.md)  |  [Next](inst-abra.md)  |  [Top](../README.md)  |
