what is wsl

1 year ago 35
Nature

Windows Subsystem for Linux (WSL) is a feature of Windows that allows developers to run a Linux environment without the need for a separate virtual machine or dual booting. There are two versions of WSL: WSL 1 and WSL 2. WSL 1 acts as a compatibility layer for running Linux binary executables by implementing Linux system calls on the Windows kernel, while 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.

WSL enables developers to run Linux in a Bash shell with their choice of distribution, such as Ubuntu, Debian, OpenSUSE, Kali, Alpine, etc. Using Bash, developers can run command-line Linux tools and apps, access their local machine’s file system from within the Linux Bash shell, and invoke Windows applications using a Unix-like command-line shell. They can also run GNU/Linux graphical applications integrated directly to their Windows desktop and use GPU acceleration for machine learning, data science scenarios, and more.

WSL is intended to give developers and bash veterans the Linux shell experience despite having to use Windows as the primary OS. It offers the best of both worlds by allowing developers to run Windows apps, like Visual Studio, alongside a Linux shell for easier command.