How to Install the Windows Subsystem for Linux 2 (WSL2)

Original article was published by David Littlefield on Artificial Intelligence on Medium


Enable WSL2:

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

Deployment Image Servicing and Management (DISM) is a program that can prepare, modify, and repair the system image. It’s used to solve issues with startup, performance, and errors that can’t be resolved. It’s also used to enable or disable features in the operating system from the command-line.

The System Image is a complete backup of everything on the computer at a specific point in time. It includes the operating system, programs, drivers, personal files, system files, and system settings. This is used to restore the contents of the computer if the hard drive or computer ever stops working.

In this section, we’ll enable WSL2:

  1. Copy the following 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