First stable release of WSL, a layer for running Linux applications on Windows

Microsoft has released a layer for running Linux applications on Windows - WSL 1.0.0 (Windows Subsystem for Linux), which is marked as the first stable release of the project. At the same time, WSL packages delivered through the Microsoft Store have been removed from experimental development.

The "wsl --install" and "wsl --update" commands have been migrated by default to use the Microsoft Store to install and update WSL, allowing for significantly faster update delivery compared to distribution as a built-in Windows component. To revert to the old installation scheme, the wsl utility provides the "--inbox" option. Windows 10 builds are also supported through the Microsoft Store, giving Windows XNUMX users access to WSL innovations such as running graphical Linux applications and support for the systemd system manager.

The updated wsl.exe utility, translated by default to download from the Microsoft Store, is included in the Windows 10 and 11 β€œ22H2” November updates, which are still installed only after manual verification (Windows Settings -> β€œCheck for Updates”), and will be applied automatically in mid-December. As an alternative installation option, you can also use the msi packages hosted on GitHub.

To ensure that Linux executables run in WSL, instead of the original emulator that translated Linux system calls to Windows system calls, a full Linux kernel environment is provided. The proposed kernel for WSL is based on the release of the Linux 5.10 kernel, which is extended with WSL-specific patches, including optimizations to reduce kernel startup time, reduce memory consumption, return memory freed by Linux processes to Windows, and leave the minimum required set of drivers and subsystems in the kernel.

The kernel runs in a Windows environment using a virtual machine already running in Azure. The WSL environment runs in a separate disk image (VHD) with an ext4 file system and a virtual network adapter. The user-space components are installed separately and are based on builds from different distributions. For example, the Microsoft Store offers builds of Ubuntu, Debian GNU/Linux, Kali Linux, Fedora, Alpine, SUSE, and openSUSE for installation on WSL.

In version 1.0, about 100 bugs have been fixed and several innovations have been implemented:

  • Provided the optional ability to use the systemd system manager in Linux environments. Systemd support allows you to reduce the requirements for distributions and bring the environment provided in WSL closer to the situation of running distributions on top of conventional hardware. Previously, to work with WSL, distributions had to use a Microsoft-provided init handler that ran under PID 1 and set up the infrastructure for interoperability between Linux and Windows.
  • For Windows 10, the ability to run Linux graphics applications has been implemented (previously graphics support was only available in Windows 11).
  • Added the "--no-launch" option to the "wsl --install" command to disable distributive launch after installation.
  • Added "--web-download" option to "wsl --update" and "wsl --install" commands to download components via GitHub instead of Microsoft Store.
  • Added "--vhd" options to the "wsl --mount" command to mount VHD files and "--name" to specify the name of the mount point.
  • Added "--vhd" command to "wsl --import" and "wsl --export" commands to import or export in VHD format.
  • Added "wsl --import-in-place" command to register and use an existing .vhdx file as distribution.
  • Added "wsl --version" command to display the version number.
  • Improved error handling.
  • Components for supporting graphical applications (WSLg) and the Linux kernel are integrated into a single package that does not require downloading additional MSI files.

In hot pursuit, the WSL 1.0.1 update was released (while it has the Pre-release status), which fixed the hanging of the wslservice.exe process when starting a new session, the file with the unix socket /tmp/.X11-unix was switched to read-only mode, improved error handlers.

Source: opennet.ru

Add a comment