Windows Subsystem for Linux (WSL) is a feature of the Microsoft Windows operating system (OS) that allows users to run native Linux command-line tools directly on Windows. WSL 2 is the latest version of WSL and includes significant improvements over the original version, including support for running Linux ELF64 binaries on Windows and better overall performance. Windows Subsystem for Linux (WSL) 2 was first introduced in the Windows 10 May 2020 Update (also known as Windows 10 version 2004). This update was released to the general public on May 27, 2020, and it included a number of new features and improvements, including the ability to use WSL 2. Here are some key differences between WSL 1 and WSL 2:

  • Performance: WSL 2 has significantly better performance compared to WSL 1. WSL 2 uses a lightweight virtual machine to run Linux, which allows it to run more efficiently and closer to native speeds.
  • File system support: WSL 2 includes support for the Linux file system, which means that you can access your Linux files directly from Windows and vice versa. In contrast, WSL 1 uses a utility called DrvFs to access Linux files, which can lead to slower file access and some compatibility issues.
  • Compatibility: WSL 2 supports running ELF64 Linux binaries, which means that it can run a wider range of Linux programs and tools compared to WSL 1.
  • Kernel: WSL 2 includes a Linux kernel that is updated regularly, which means that you can use the latest Linux features and technologies. In contrast, WSL 1 does not include a Linux kernel and relies on a compatibility layer to run Linux programs.

Precautions and Potential Safety Issues With Software[edit | edit source]

  1. Always use caution when downloading unknown software including complete programs, development libraries, and 3rd party code.

Installation[edit | edit source]

The complete installation instructions can be found in the documentation on Microsoft's website.

  1. Check your Windows version and build, you must be running Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11 to use the commands below.
  2. Open command line by searching for it or pressing "WIN + R" and typing "cmd" and pressing run
  3. In command line type "wsl --install", by default this will enable the features necessary to run WSL and install the Ubuntu distribution of Linux.
    • To install a different distribution add the following flags to the installation command:
      • --distribution: To specify which Linux distribution to install, you can find available distributions by running wsl --list --online.
      • --no-launch: Install the Linux distribution but do not launch it automatically.
      • --web-download: This is used if you wish to install from an online source rather than using the Microsoft Store.
    • Windows terminal allows you to open your various distributions as separate tabs in a single window.

Operation & Procedure[edit | edit source]

References[edit | edit source]

  1. Microsoft: WSL Documentation
  2. Wikipedia: Windows Subsystem for Linux

FA info icon.svg Angle down icon.svg Page data
Keywords safety, laboratory, fast methods
Authors Cameron Brooks
License CC-BY-SA-4.0
Organizations Free Appropriate Sustainable Technology, Western University
Language English (en)
Related 0 subpages, 2 pages link here
Impact 234 page views
Created December 29, 2022 by Cameron Brooks
Modified February 28, 2024 by Felipe Schenone
Cookies help us deliver our services. By using our services, you agree to our use of cookies.