coop-cloud-win-deploy/md/inst-wsl2-linux.md

6.8 KiB

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?

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?

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.

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).

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

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 section at the bottom of the Microsoft WSL installation page. 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 03

  2. 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

    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.

    04

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

  3. 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

    07

    RESTART YOUR COMPUTER to complete the WSL install:

    08

  4. 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 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 12

  5. 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 14

  6. Step 6 of 6 is to install your distribution of Linux. In this guide I'll be installing Debian 10 Buster. 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 You can also view the list of Linux Distributions by running a wsl command:

    wsl --list --online

    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

    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 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 Screenshots of my installation of the Debian distro: 23 You Linux username does not need to be the same as your Windows username. 24

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

| Previous | Next | Top |