SUPPORT THE WORK

GetWiki

Windows Subsystem for Linux

ARTICLE SUBJECTS
aesthetics  →
being  →
complexity  →
database  →
enterprise  →
ethics  →
fiction  →
history  →
internet  →
knowledge  →
language  →
licensing  →
linux  →
logic  →
method  →
news  →
perception  →
philosophy  →
policy  →
purpose  →
religion  →
science  →
sociology  →
software  →
truth  →
unix  →
wiki  →
ARTICLE TYPES
essay  →
feed  →
help  →
system  →
wiki  →
ARTICLE ORIGINS
critical  →
discussion  →
forked  →
imported  →
original  →
Windows Subsystem for Linux
[ temporary import ]
please note:
- the content below is remote from Wikipedia
- it has been imported raw for GetWiki
{{short description|Compatibility layer for running Linux binary executables natively on Windows}}{{Use dmy dates|date=February 2019}}







factoids
Windows Subsystem for Linux (WSL) is a compatibility layer for running Linux binary executables (in ELF format) natively on Windows 10 and Windows Server 2019.In May 2019, WSL 2 was announced,{{Cita web|url=https://devblogs.microsoft.com/commandline/announcing-wsl-2/|title=Announcing WSL 2|author=Craig Loewen|date=2019-05-06|website=Windows Command Line Tools For Developers}} introducing important changes such as a real Linux kernel,{{Cita web|url=https://docs.microsoft.com/en-us/windows/wsl/wsl2-about|title=About WSL 2|website=docs.microsoft.com|author=mscraigloewen}} through a subset of Hyper-V features. Since June, 2019, WSL 2 is available to the Windows 10 customers through the Windows Insider program, including the Home edition.{{Cita web|url=https://devblogs.microsoft.com/commandline/wsl-2-post-build-faq/|title=WSL 2 Post BUILD FAQ|date=2019-05-14|access-date=|website=Windows Command Line Tools For Developers}}

Overview

The first release of WSL provides a Linux-compatible kernel interface developed by Microsoft, containing no Linux kernel code,WEB,weblink GNU/kWindows, Gerwitz, Mike, mikegerwitz.com, 8 April 2018, which can then run a GNU user space on top of it, such as that of Ubuntu,WEB, Harsh, Mike, Run Bash on Ubuntu on Windows,weblink Building Apps for Windows, Microsoft, 30 March 2016, WEB, Finley, Klint, Why Microsoft Making Linux Apps Run on Windows Isn't Crazy,weblink Wired (website), Wired, Condé Nast, 30 March 2016, WEB,weblink Ubuntu on Windows – The Ubuntu Userspace for Windows Developers, Kirkland, Dustin, 30 March 2016, Ubuntu Insights, Canonical (company), Canonical, WEB, Hammons, Jack, Bash on Ubuntu on Windows,weblink MSDN, Microsoft, 9 April 2016, openSUSE,Get openSUSE Leap 42 - Microsoft Store SUSE Linux Enterprise Server,Get SUSE Linux Enterprise Server 12 - Microsoft StoreWEB,weblink InfoWorld, 12 May 2017, 16 September 2017, Windows Subsystem for Linux welcomes Suse and Fedora options, Yegulalp, Serdar, DebianNEWS,weblink Debian GNU/Linux for WSL now available in the Windows Store, Windows Command Line Tools For Developers, 7 March 2018, en-US, and Kali Linux.NEWS,weblink Kali Linux in the Windows App Store, 9 March 2018, en-US, Such a user space might contain a Bash shell and command language, with native GNU/Linux command-line tools (sed, awk, etc.), programming language interpreters (Ruby, Python, etc.), and even graphical applications (using a X11 server at the host side).WEB, Frequently Asked Questions for WSL,weblink Microsoft, 13 November 2016, The architecture was redesigned in WSL 2, with a Linux kernel running in a lightweight virtual machine environment.

Introduction and availability

When introduced with the Anniversary Update on August 2, 2016, only an Ubuntu image was available. The Fall Creators Update, released on October 17, 2017, moved the installation process for Linux distributions to the Windows Store, and introduced SUSE images.WEB,weblink Ubuntu now available from the Windows Store!, 10 July 2017, Windows Command Line Tools For Developers Blog, 11 August 2017, WSL is available only in 64 bit versions of Windows 10 from version 1607. It is also available in Windows Server 2019.Microsoft announced WSL 2 on May 6th, 2019, which features a completely new VM-based backend (based in a subset of Hyper-V features) in lieu of the prior system call adaptation layer, planned for release through the Windows Insider program in June 2019.

Development

Microsoft's first foray into achieving Unix-like compatibility on Windows began with the Microsoft POSIX Subsystem, superseded by Windows Services for UNIX via MKS/Interix, which was eventually deprecated with the release of Windows 8.1. The technology behind Windows Subsystem for Linux originated in the unreleased Project Astoria, which enabled some Android applications to run on Windows 10 Mobile.WEB,weblink Why Microsoft needed to make Windows run Linux software, Bright, Peter, 6 April 2016, Ars Technica, Condé Nast, It was first made available in Windows 10 Insider Preview build 14316.WEB, Aul, Gabe, Announcing Windows 10 Insider Preview Build 14316,weblink Windows Experience Blog, Microsoft, 6 April 2016, Whereas Microsoft's previous projects and the third-party Cygwin had focused on creating their own unique Unix-like environments based on the POSIX standard, WSL aims for native Linux compatibility. Instead of wrapping non-native functionality into Win32 system calls as these prior systems utilized, WSL's initial design (WSL 1) leveraged the NT kernel executive to serve Linux programs as special, isolated minimal processes (known as "pico processes") attached to kernel mode "pico providers" as dedicated system call and exception handlers distinct from that of a vanilla NT process, opting to reutilize existing NT implementations wherever possible.NEWS,weblink Windows Subsystem for Linux Overview, Windows Subsystem for Linux, 22 April 2018, en-US, Though WSL (via this initial design) was much faster and arguably much more popular than its brethren UNIX-on-Windows projects, Windows kernel engineers found difficulty in trying to increase WSL's performance and syscall compatibility by trying to reshape the existing NT kernel to recognize and operate correctly on Linux's API. At a Microsoft Ignite conference in 2018, Microsoft engineers gave a high-level overview of a new "lightweight" Hyper-V VM technology for containerization where a virtualized kernel could make direct use of NT primitives on the host.{{Citation|last=Microsoft Ignite|title=OS internals: Technical deep-dive into operating system innovations - BRK3365|date=2018-10-02|url=https://www.youtube.com/watch?v=tG8R5SQGPck&feature=youtu.be&t=24m50s|access-date=2019-05-07}} In 2019, Microsoft announced a completely redesigned WSL architecture (WSL 2) using this lightweight VM technology hosting actual (customized) Linux kernel images, claiming full syscall compatibility.Microsoft envisages WSL as "primarily a tool for developers – especially web developers and those who work on or with open source projects". WSL uses fewer resources than a typical virtual machine (prior to WSL the most direct way to run Linux software in a Windows environment), while also allowing users to use Windows apps and Linux tools on the same set of files.

Architecture

WSL 1

LXSS Manager Service

LXSS Manager Service is the service in charge of interacting with the subsystem (through the drivers {{code|lxss.sys}} and {{code|lxcore.sys}}), and the way that Bash.exe (not to be confused with the Shells provided by the Linux distributions) launches the Linux processes, as well as handling the Linux system calls and the binary locks during their execution.WEB,weblink Windows Subsystem for Linux Overview, Windows Subsystem for Linux blog on MSDN, Jack Hammons, 22 April 2016, All Linux processes invoked by a particular user go into a "Linux Instance" (usually, the first invoked process is init). Once all the applications are closed, the instance is closed.

wsl.exe









factoids
The wsl.exe command is used to manage distributions in the Windows Subsystem for Linux on the command-line. It can list available distributions, set a default distribution, and uninstall distributions.Manage and configure Windows Subsystem for Linux The command can also be used to run Linux binaries from the Windows Command Prompt or Windows PowerShell.Windows Subsystem for Linux interoperability with Windows wsl.exe replaces lxrun.exe which is deprecated as of Windows 10 1803 and later.Command Reference for Windows Subsystem for Linux

Examples

Run uname command in WSL using PowerShell.PS C:temp> wsl uname --allLinux WikiMachine 4.4.0-18362-Microsoft #1-Microsoft Mon Mar 18 12:02:00 PST 2019 x86_64 x86_64 x86_64 GNU/LinuxExample using sudo command from Command Prompt.C:temp> wsl sudo apt-get update[sudo] password for username:Hit:1weblink xenial InReleaseGet:2weblink xenial-security InRelease [94.5 kB]

Hardware and filesystem access

WSL 1's design featured no hardware emulation / virtualization (unlike other projects such as coLinux) and makes direct use of the host file system (through {{Code|VolFS}} and {{Code|DrvFS}})WEB, WSL File System Support,weblink Windows Subsystem for Linux blog on MSDN, Jack Hammons, 15 June 2016, and some parts of the hardware, such as the network (web servers for example, can be accessed through the same interfaces and IP addresses configured on the host, and shares the same restrictions on the use of ports that require administrative permissions, or ports already occupied by other applications), which guarantees interoperability.WEB,weblink WSL Networking, Windows Subsystem for Linux blog on MSDN, Jack Hammons, 8 November 2016, There are certain locations (such as system folders) and configurations whose access/modification is restricted, even when running as root, with sudo from the shell. An instance with elevated privileges must be launched in order to get "sudo" to give real root privileges, and allow such access.

Limitations

WSL 1 is not capable of running all Linux software, such as 32-bit binaries,WEB,weblink Please enable WSL to run 32 bit ELF binaries, Windows Developer feedback (Microsoft/UserVoice), WEB,weblink Support for 32-bit i386 ELF binaries, GitHub, or those that require specific Linux kernel services not implemented in WSL. Due to a lack of any "real" Linux kernel in WSL 1, kernel modules, such as device drivers, can't be run. WSL 2, however, makes use of live virtualized Linux kernel instances.It is possible to run some graphical (GUI) applications (such as Mozilla Firefox) by installing an X11 server within the Windows (host) environment (such as VcXsrv or Xming),WEB,weblink Windows 10's Bash shell can run graphical Linux applications with this trick, 10 September 2018, PC World, although not without caveats, such as the lack of audio support or hardware acceleration (resulting in poor graphics performance). Support for OpenCL and CUDA is also not being implemented currently, although planned for future releases.WEB,weblink GPU not accesssible for running tensorflow and installing CUDA · Issue #1788 · Microsoft/WSL, 10 September 2018, GitHub, WEB, OpenCL & CUDA GPU support,weblink 15 September 2016, 10 September 2018, Windows Developer feedback (Microsoft/UserVoice), Microsoft stated WSL 1 as being oriented to the development of applications, and not for desktop environment or production servers, recommending the use of virtual machines (Hyper-V), Kubernetes and Azure for those purposes.

Benchmarks

In benchmarks WSL 1's performance is often near native Linux Ubuntu, Debian, Intel Clear Linux or other Linux distributions. I/O is in some tests a bottleneck for WSL.WEB,weblink Windows Subsystem for Linux, Phoronix, WEB,weblink A Look At The Windows 10 October 2018 Update Performance With WSL, Michael Larabel, 12 October 2018, Phoronix, WEB,weblink The WSL Improvements In The Windows 10 October 2018 Update, Michael Larabel, 5 November 2018, Phoronix, The redesigned WSL 2 backend is claimed by Microsoft to offer twenty-fold increases in speed on certain operations compared to that of WSL 1.

WSL 2

Version 2 introduces changes in the architecture. Microsoft has opted for virtualization through a highly optimized subset of Hyper-V features, in order to run its provided kernel and the underlying distributions, promising performance equivalent to WSL 1. Backwards compatibility is in mind, so, the developers don't need to change anything in their published distributions. Even in this version exists a new WSL global configuration, in a same way as in 1, by a INI file named .wlsconfig located in User folder too. The distribution installation resides inside an ext4-formatted filesystem inside a virtual disk, and the host file system is transparently accessible through the 9P protocol.WEB,weblink A Deep Dive Into How WSL Allows Windows to Access Linux Files, 2019-05-30, Windows Command Line Tools For Developers, en-US, 2019-06-24, For the users, Microsoft promised up to 20 times the read/write performance than WSL 1.WEB,weblink Announcing WSL 2, 2019-05-06, Windows Command Line Tools For Developers, en-US, 2019-06-24,

Screenshots

File:WSL gui Firefox.png|Firefox for Linux running on WSLFile:WSL gui Synaptic.png|Synaptic package manager running on WSL

See also

{{div col|colwidth=20em}} {{div col end}}

References

{{Reflist|30em}}

External links

{{Microsoft Windows components}}{{Unix-Windows Interoperability}}

- content above as imported from Wikipedia
- "Windows Subsystem for Linux" does not exist on GetWiki (yet)
- time: 5:04am EDT - Sat, Aug 24 2019
[ this remote article is provided by Wikipedia ]
LATEST EDITS [ see all ]
GETWIKI 09 JUL 2019
Eastern Philosophy
History of Philosophy
GETWIKI 09 MAY 2016
GETWIKI 18 OCT 2015
M.R.M. Parrott
Biographies
GETWIKI 20 AUG 2014
GETWIKI 19 AUG 2014
CONNECT