What is the Windows Subsystem for Linux (WSL)? - MohanadSinan/Smart-Methods GitHub Wiki

The Windows Subsystem for Linux (WSL) lets developers run a GNU/Linux environment -- including most command-line tools, utilities, and applications -- directly on Windows, unmodified, without the overhead of a virtual machine.

You can:

  • Choose your favorite GNU/Linux distributions from the Microsoft Store.
  • Run common command-line tools such as grep, sed, awk, or other ELF-64 binaries.
  • Run Bash shell scripts and GNU/Linux command-line applications including:
    • Tools: vim, emacs, tmux
    • Languages: NodeJS, Javascript, Python, Ruby, C/C++, C# & F#, Rust, Go, etc.
    • Services: SSHD, MySQL, Apache, lighttpd, MongoDB, PostgreSQL.
  • Install additional software using own GNU/Linux distribution package manager.
  • Invoke Windows applications using a Unix-like command-line shell.
  • Invoke GNU/Linux applications on Windows.

System requirements:

Before installing WSL, make sure that your computer meets the minimum system requirements to run WSL:

  • You must be running Windows 10 version 1607 (the Anniversary update) or above.
  • WSL will only run on 64-bit versions of Windows 10. 32-bit versions are not supported.

To check that you meet these requirements, follow these steps:

  1. Open your Settings. You can do this by clicking the gear icon on the Start menu, or by opening the Power User Tasks menu and choosing Settings.
  2. In the Settings window, choose System.
  3. On the left side of the System window, choose About.
  4. On the right side of the window, system information is displayed. Make sure the Version is at least 1607, and the System type is a 64-bit operating system.

Windows settings, system, about

If the Version number is less than 1607, you need to perform a Windows Update before installing WSL.

If the System type is not a 64-bit operating system, you cannot run WSL.

What is WSL 1?

The original WSL is now known as WSL1. WSL1 is a compatibility layer for running Linux binary executables (ELF) natively on Windows 10. No re-compilation or 'porting' of applications is required. WSL1 provides a Linux-compatible kernel interface developed by Microsoft that allows a user to choose a Linux distribution to install from the Microsoft Store. WSL1 executes unmodified Linux ELF64 binaries by operating a Linux kernel interface on top of the Windows kernel in Windows 10. The WSL1 interface translates Linux system calls from the binaries into Windows system calls and then executes them at native speed. Linux applications run within the Linux distribution which provides the application's dependencies and package management in a container-like environment. WSL provides an interface to mount drives within WSL.

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.

WSL2 was announced at Windows 10, Version 2004, Build 19041. WSL2 features a Linux kernel running inside Windows 10 and is built on the core technology of Hyper-V to provide better Linux application support and improved file performance. Transitioning to WSL2 is seamless. WSL2 is still in active development and is only available in Insider builds. These builds are not suitable for production devices and are not recommended for a user's primary machine. Instead, users can try WSL2 using Hyper-V or on a secondary machine.

Note: For more information about WSL 2 click here.

Comparing WSL 2 and WSL 1

The primary goals of updating the Windows Subsystem for Linux to a new version are to increase file system performance and support full system call compatibility.

WSL 2 uses the latest and greatest in virtualization technology to run a Linux kernel inside of a lightweight utility virtual machine (VM). However, WSL 2 is not a traditional VM experience.

Comparing features

Feature WSL 1 WSL 2
Integration between Windows and Linux
Fast boot times
Small resource foot print
Managed VM
Full Linux Kernel
Full system call compatibility
Runs with current versions of VMWare and VirtualBox
Performance across OS file systems

Note: For more Comparing WSL 2 and WSL 1 information click here.