Windows Subsystem for Linux, abbreviated WSL, is an add-on for Windows 10 and Windows 11 that allows users to bring Linux to Windows with the ability to directly run a wide range of distributions. Thanks to WSLgit is also possible to run Linux programs on Windows with a graphical interface: this means that the “penguin” applications can be installed on the Microsoft system and started from the taskbar, from the Start menu, from the operating system desktop and from any other memory location .
The latest version of WSL uses a real kernel Linux which Microsoft continuously updates, as it does with the packages available on Windows Update. In another article we saw the main differences between WSL and Hyper-V, precisely because the Windows subsystem for Linux relies on Microsoft’s virtualization solution.
The Windows Subsystem for Linux September 2023 Update introduces a number of important features noveltysome of which have been long awaited or highly requested by users.
How to check the version of Windows Subsystem for Linux installed on your system
To install Windows Subsystem for Linux in Windows 10 and Windows 11, just press Windows+R
then type optionalfeatures
scroll through the list of available features, tick the box Windows Subsystem for Linux then click on the OK button.
Typing cmd
in the Windows search box then issuing the command wsl --version
you can verify the version of WSL installed on the system. At the time of writing, Windows 10 and Windows 11 do not automatically load the latest version released by Microsoft in September 2023, even by typing the command wsl --update
.
To install the new WSL 2.0.0 updated in September 2023, simply visit the GitHub page then download and run the correct package: on systems based on x86-64 processor just grab and run the suffixed file x64.msi
. It’s a shame that Microsoft SmartScreen appears with the “publisher unknown” message: just click on anyway Further information and authorize the installation of the software.
Once the procedure is completed, the command wsl --version
shows 2.0.0.0 next to WSL version.
The new features of Windows Subsystem for Linux
With the precise aim of optimizing the execution of programmi Linux in WindowsMicrosoft engineers have added a series of settings to customize the behavior of WSL:
- autoMemoryReclaim: Reduces the amount of memory used by WSL virtual machines when they are idle.
- Sparse VHD: Automatically compresses the space occupied by WSL virtual hard disks (VHDs).
- Mirrored mode networking: New networking mode that adds new features and improves interoperability between local systems.
- dnsTunneling: Changes the approach by which WSL resolves DNS requests. By setting the item to trueWSL finally uses the DNS set in Windows.
- firewall– Applies Windows firewall rules to WSL and allows additional controls for virtual machines.
- autoProxy: Allows WSL to use Windows proxy settings.
To use the new ones WSL settingsstill considered experimental, a file must be created .wslconfig
in the current user’s home directory (%userprofile%
) then insert, for example, the following:
[experimental] autoMemoryReclaim=gradual sparseVhd=true networkingMode=mirrored firewall=true dnsTunneling=true
All possible settings are commented out in this file, immediately below the section Section label: `[experimental]`
.
Setting autoMemoryReclaim are gradual
for example, in the case where the macchine Linux WSL are unused for 5 consecutive minutes, the system gradually begins to release the Linux cache memory making it available as free memory for the Windows host. This means that thememory occupation of the virtual machine is automatically reduced if not used.
Mirrored network mode: what it is and how it works
Anyone who has used WSL up to now knows very well the “balancing trades” that had to be put in place to enable Linux machines to communicate with other devices on the local network.
Well, setting networkingMode are mirroredWSL provides reproduce network interfaces used in Windows by exposing them to every single Linux system. By doing so, for example, it becomes possible connect to host machines from Linux using the localhost address 127.0.0.1 and you can reach WSL through systems physically connected to local network. Furthermore, WSL becomes compatible with all major solutions VPN.
Always on the side of networkingwith the setting dnsTunneling it finally becomes possible to set the default use of the DNS server configured in Windows for all virtual machines running via WSL.
In the video published on YouTube, Craig Loewen – Microsoft Product Manager – summarizes the operation of all the new features of WSL 2.0.0, highlighting its considerable potential. For more information, you can also consult the announcement of the availability of the new version of the Windows Subsystem for Linux package.