Awesome WSL Overview

Awesome list dedicated to Windows Subsystem for Linux

🏠 Home · 🔥 Feed · 📮 Subscribe · ❤️ Sponsor · 😺 sirredbeard/Awesome-WSL · ⭐ 5.3K · 🏷️ Development Environment

[ Daily / Weekly / Overview ]

Awesome WSL - Windows Subsystem for Linux Awesome

An Awesome collection of Windows Subsystem for Linux (WSL) information, distributions, and tools.

WSL Screenshot

Contents

Overview

1. Linux

Linux is a UNIX-like (⭐1.5k) open-source operating system. The core of Linux is a kernel developed by Linus Torvalds. Linux also includes a wide array of applications built on top of the kernel, including web servers, compilers, and e-mail clients, developed and contributed to the Linux ecosystem by a worldwide community of programmers. These applications are then assembled together into Linux distributions by companies, communities, and individuals.

2. Linux Distributions

Unlike Windows or macOS there are many different Linux distributions, each of which is assembled with different approaches to the software selection and implementation. For example, the goal of the non-profit volunteer Debian Project community is to produce a universal free operating system, while the goal of the for-profit SUSE is to provide a stable enterprise platform. There are also Linux distributions based on other distributions. Ubuntu is a distribution based on Debian built by the company Canonical. Kali is a distribution based on Debian built with an emphasis on tools for network security testing. You can see the most popular distributions ranked at DistroWatch.

3. Windows

Windows is a family of proprietary operating systems, all of which are developed, marketed, and sold by Microsoft. Currently Windows 10 is Microsoft's flagship operating system. Windows 10 is available for Intel x86-based and arm64-based PCs. The Windows Subsystem for Linux first shipped in Windows 10 Anniversary Update, version number 1607, in August 2016. WSL can be enabled for free on all versions of Windows 10 after 1607, including Home, Professional, Enterprise, Server, LTSB, and Education. Originally only available for Intel x86-based PCs, Ubuntu 18.04 for arm64 was made available on the Microsoft store in May 2018.

4. WSL1

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.

5. WSL2

WSL2 was announced at Microsoft Build 2019. WSL2 features a Linux kernel running inside Windows and is built on the core technology of Hyper-V to provide better Linux application support and improved file system performance. Transitioning to WSL2 is seamless. WSL2 is set by default since Windows 11.

6. Emulation

Windows Subsystem for Linux is not an emulator or virtualizer like VirtualBox. WSL1 is closer in its approach to Wine which is a compatibility layer to run Windows binaries on Linux by re-implementing Windows system and API calls in libraries.

7. Details

You want the gritty details? Here they are:

8. Installation

9. Use Cases

WSL is undoubtedly a tool for power-users, developers, and *NIX/Linux geeks who want to run Windows. Most of the things you can do with WSL are going to be related to programming, the console, sysadmin, automation, AI/data science, and other geeky things.

10. GUI Apps

Yes, a suprising number (⭐1.1k) of Linux GUI apps can run on WSL. GUI applications are officially supported on WSL2 with Windows Insider Preview since Windows 10 Insider Preview build 21286. It will also be available in Windows 10's fall 2021 release, and Windows 11. The GUI capabilities of WSL2 are informally referred to as WSLg.

If you have an earlier release of Windows 10, then running a GUI app on WSL requires an operational X server on Windows. This must be downloaded, installed, and running for your GUI app to open from WSL; or it will complain that it cannot find a display. X servers for Windows include X410 💰 (very highly recommended), VcXsrv, GWSL, or Xming on Windows 10.

11. Systemd

On September 21st 2022, Microsoft announced[1] official support for systemd in WSL2 disributions. As of version 0.67.6 of WSL2, you can now enable booting with systemd in WSL, enabling support for services and applications like snap.


[1]: The announcement was published in Microsoft's tech/dev blog Windows Command Line. You can view the article here for more details on systemd support in WSL 2.

Using WSL

The WSL Shell

Programming on WSL

Every developer has a unique workflow. Windows and WSL enable developers to carefully customize their setup for their unique workflow. The following are different developers' approaches to creating their development environments using WSL and instructions on how to do the same:

To learn more about programming generally, visit curated-programming-resources (⭐2.9k).

Microsoft makes free development tools available, publishes programming guides through MSDN, and offers courses through edX and Microsoft Virtual Academy.

Web Development on WSL

Because WSL allows developers to run a variety of Linux server applications locally on their Windows machine, WSL is uniquely useful for web, cloud, and other server-side development tasks. The following are different developers' approaches to creating their web development environment using WSL and instructions on how to do the same:

CUDA Development on WSL

WSL allows for CUDA usage in the Linux environment for machine learning, intense mathematics or related uses. In order to activate CUDA inside WSL, Windows 11 or Windows 10 with version 21H2 support is required. WSL2 is required along with the 5.10 kernel which is available through wsl --update command.

You can test the install after following the above steps through PyTorch (torch.cuda.is_available()) or similar tools. Another option is using the NVIDIA CUDA Samples (⭐5.7k).

Other WSL Uses

Supported Distributions

Ubuntu

Ubuntu is a Linux distribution based on Debian that is produced by Canonical Ltd.. Ubuntu 16.04 and the more recent Ubuntu 18.04 are both available for WSL from the Microsoft Store.

Debian

Debian is a Linux distribution assembled by volunteers with the community Debian Project.

OpenSUSE / SUSE Enterprise Linux

OpenSUSE and SUSE Enterprise Linux are Linux distributions produced by SUSE Linux GmbH and other companies. Tumbleweed and Leap are community-oriented distributions. Tumbleweed is a rolling release distribution with the latest software, while Leap is a stable distribution based on SUSE Enterprise Linux. SUSE Enterprise Linux is an enterprise-grade commercial distribution with older tested software.

Kali Linux

Kali Linux is a Linux distribution focused on penetration testing based on Debian that is produced by Offensive Security.

Fedora Remix for WSL

Fedora Remix for WSL is a Linux distribution derived from the Fedora distribution.

Pengwin

Pengwin (formerly WLinux) is a Linux distribution based on Debian that is designed for WSL users by independent open source developers at Whitewater Foundry.

Pengwin Enterprise

Pengwin Enterprise is a custom WSL solution available to enterprise customers from Whitewater Foundry. Pengwin Enterprise supports Red Hat Enterprise Linux, CentOS, and Scientific Linux. A demo of Pengwin Enterprise built with Scientific Linux is available on the Microsoft Store.

Oracle Linux

Oracle Linux is a Linux distribution based on Red Hat Enterprise Linux that is produced by Oracle.

AlmaLinux OS

AlmaLinux OS is an open-source, community-driven Linux operating system that fills the gap left by the discontinuation of the CentOS Linux stable release.

Unofficial Distributions

Unofficial distributions must be installed manually or with tools listed below. They are not available in the Windows Store.

WSL Tools

X Servers

An X server running on Windows is required for running Linux GUI apps on Windows. See FAQ #10 above.

Terminals

For Managing WSL Installations

WSL Utilities

WSL-Specific Development Tools

Miscellaneous Tools

Books

Additional Resources

More Awesome

More Awesome lists. github project

Thanks

Intellectual Property Notices

All other trademarks mentioned herein are the property of their respective owners and may be registered in the United States and/or other countries.

The author of this project has no connection with Microsoft, Inc.

Portions of the descriptions above are from Wikipedia and used under CC BY-SA 4.0 license. Portions of the descriptions above are from Awesome-UNIX (⭐1.5k) and used under CC BY-SA 4.0 license.

This document is licensed under CC BY-SA 4.0 license.