Table of Contents

Windows Subsystem for Linux (WSL) Setup on Windows 10

Penguin by Lars Meiertoberens from the Noun Project

This setup guide outlines the steps required to set up the Windows Subsystem for Linux (WSL) feature on a Windows 10 workstation.

Install WSL Feature through PowerShell

  1. As an admin/privileged user, open up PowerShell using “Run as Admin”.
  2. Within PowerShell, run the following commands to enable both WSL1 and WSL2 (VMs):

    dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestar
    dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
  3. Within PowerShell, download and install the Linux Kernel Update package using the following commands:

    Invoke-WebRequest –Uri https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi
    .\wsl_update_x64.msi
  4. Within PowerShell, restart the Windows 10 workstation using the following command:

    Restart-Computer -Force

Setup Linux Environment (Ubuntu 20.04 LTS)

  1. Open PowerShell with the standard user account of the employee who will be utilizing WSL.
  2. Run the following commands within the PowerShell window to download and setup Ubuntu 20.004 within WSL:

    curl.exe -L –o ubuntu-2004.appx https://aka.ms/wslubuntu2004
    Rename-Item .\ubuntu-2004.appx .\ubuntu-2004.zip
    Expand-Archive .\ubuntu-2004.zip
    cd .\ubuntu-2004\
    .\ubuntu2004.exe
  3. You will now be in the initial setup stages of the Ubuntu environment, where you can set up the initial Linux user. Once the user is created and you are dropped into the Linux shell, you should run the following commands to get the latest security and bug updates:

    sudo apt-get update && sudo apt-get upgrade -y 
  4. Enjoy your day!

Sources

~~DISCUSSION~~