The Founder’s Guide:

How to Install Windows Subsystem for Linux 2 (WSL2)

The expanded tutorial with explanations and screenshots

David Littlefield
The Startup

--

Image by Isis França

The condensed version of this article contains copy and paste code to help get the outcome ASAP ⚡

Join the Windows Insider Program:

The Windows Insider Program is an open software testing program that’s operated by Microsoft. It provides members with early access to the latest Windows features, news, and updates. It also doesn’t cost anything to join and only requires a valid copy of Windows 10 and a Microsoft account.

  1. Visit the official website
  2. Click “Register”
  3. Click “Sign In Now”
  4. Sign into Microsoft
  5. Check “I Accept the Terms of This Agreement”
  6. Click “Register Now”
  7. Click “Flight Now”

Select the Dev Channel:

The Windows Insider Program allows members to choose which type of experience they want based on their needs. It categorizes experiences into three channels that determine the level of stability, features, and support that’s provided. This includes the Dev, Beta, and Release Preview Channel.

  1. Click “Open Settings”
  2. Click “Get Started”
  3. Click “Link an Account”
  4. Sign into Microsoft
  5. Select “Dev Channel”
  6. Click “Confirm”
  7. Click “Restart Now”

Check the Windows Update:

The Windows Update is a free Microsoft service that provides updates to the Windows 10 operating system regularly. It includes major updates that add new features, bug fixes, and changes to applications. It also includes minor updates that add small bug fixes and changes to the current major update.

  1. Press “⊞ Windows”
  2. Enter “Check for Updates” into the search bar
  3. Click “Check for Updates”
  4. Click “Check for Updates”

Open PowerShell:

PowerShell is a command-line shell and object-oriented scripting language that’s used to automate administrative tasks and configure system settings It can be used to automate practically anything in the operating system. It also replaced Command Prompt as the default system shell for Windows 10.

  1. Press “⊞ Windows”
  2. Enter “PowerShell” into the search bar
  3. Click “Run as Administrator”

Enable WSL2:

Windows Subsystem for Linux 2 (WSL2) is a Windows 10 feature that allows users run Linux on Windows without using dual-boot or a virtual machine. It has full access to both filesystems, GPU support, and network application support. It also provides access to thousands of Linux command-line tools.

  1. Copy the command from below these instructions
  2. Paste the command into PowerShell
  3. Press “Enter”
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

Check the Windows Update:

The Windows Update is a free Microsoft service that provides updates to the Windows 10 operating system regularly. It includes major updates that add new features, bug fixes, and changes to applications. It also includes minor updates that add small bug fixes and changes to the current major update.

  1. Press “⊞ Windows”
  2. Enter “Check for Updates” into the search bar
  3. Click “Check for Updates”
  4. Click “Advanced Options”
  5. Click “Receive Updates for Other Microsoft Products”
  6. Click “←”
  7. Click “Check for Updates”

Enable the Virtual Machine Platform:

The Virtual Machine Platform is an optional feature in Windows 10 that enables support for virtual machines. It contains a subset of virtualization features from Hyper-V that allows other programs to use virtual machines. It also causes older versions of VMWare and VirtualBox to stop working.

  1. Copy the command from below these instructions
  2. Paste the command into PowerShell
  3. Press “Enter”
  4. Restart the computer
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

Update the Kernel:

The Update command is used in WSL2 to install the latest Linux kernel. It installs the new Linux kernel and stores the previous kernel as a rollback kernel. It can also be used with the “Rollback” option which restores the previous Linux kernel but it can’t be changed until the next kernel update.

  1. Copy the command from below these instructions
  2. Paste the command into PowerShell
  3. Press “Enter”
wsl --update

Set the Default Version:

The Set Default Version command is used in WSL2 to specify which version of WSL2 to install for new Linux distributions. It installs WSL1 by default so it needs to be changed to WSL2 before a new Linux distribution is installed. It can also change back to WSL1 at any time by running the same command.

  1. Copy the command from below these instructions
  2. Paste the command into PowerShell
  3. Press “Enter”
wsl --set-default-version 2

Install Ubuntu:

Ubuntu is an open source operating system that’s built on top of Debian that includes thousands of supporting programs. It has become one of the most popular Linux distributions that’s known for being easy to use, reliable, and free. It can also be used on desktops, servers, and internet of things devices.

  1. Open the Microsoft Store
  2. Click “Get”
  3. Click “Install”
  4. Click “Launch”

Create the User Account:

The User Account is the default Unix account that’s created when Ubuntu first launches. It has administrative privileges by default which lets it make changes to files, open any program, and run any command. It also has its own password protected home directory, documents, and system settings.

  1. Enter a username into PowerShell
  2. Enter a password into PowerShell
  3. Reenter the password into PowerShell

“Hopefully, this article helped you get the 👯‍♀️🏆👯‍♀️, remember to subscribe to get more content 🏅”

Next Steps:

This article is part of a mini-series that helps readers set up everything they need to start using WSL2 for artificial intelligence, machine learning, deep learning, and or data science. It includes articles that contain instructions with copy and paste code and screenshots that help readers get the outcome as soon as possible. It also includes articles that contain instructions with explanations and screenshots that help readers process what’s happening.

01. Install Windows Subsystem for Linux 2 (WSL2)
02. Install the NVIDIA CUDA Driver and Toolkit in WSL2
03. Install Software From Source Code in WSL2
04. Install the Jupyter Notebook Home and Public Server in WSL2
05. Install Virtual Environments in Jupyter Notebook in WSL2
06. Install Programs With a Graphical User Interface in WSL2
07. Install Ubuntu Desktop With a Graphical User Interface in WSL2

Glossary:

The Dev Channel is a channel in the Windows Insider Program that’s built for technical users that want access to the latest Windows features. It allows users try out new features long before they’re released to the general public. It can also be unstable at times and require some workarounds in exchange.[Return]

The Shell is an interpreter that presents the command-line interface to users and allows them to interact with the kernel. It lets them control the system using commands entered from a keyboard. It also translates the commands from the programming language into the machine language for the kernel.[Return]

The Interpreter is a program that reads through instructions that are written
in human-readable programming languages and executes the instructions
from top to bottom. It translates each instruction to a machine language the
hardware can understand, executes it, and proceeds to the next instruction.[Return]

The Command-Line Interface (CLI) is a program that accepts text input from the user to run commands on the operating system. It lets them configure the system, install software, and access features that aren’t available in the graphical user interface. It also gets referred to as the terminal or console.[Return]

The Kernel is the program at the heart of the operating system that controls everything in the computer. It facilitates the memory management, process management, disk management, and task management. It also facilitates communication between the programs and hardware in machine language.[Return]

Deployment Image Servicing and Management (DISM) is a program that’s used to prepare, modify, and repair the Windows operating system. It fixes problems with startup, performance, and errors that can’t be resolved. It can also enable features in the operating system from the command-line.
[Return]

--

--

David Littlefield
The Startup

From: Non-Technical | To: Technical Founder | Writes: To Make It Easier For Everyone | Topics: #Startups #How-To #Coding #AI #Machine Learning #Deep Learning