If you're using the stable version of Windows, WSL is updated very infrequently; probably once or twice per year. The kernel will be serviced by Windows updates, which means you will get the latest security fixes and kernel improvements without needing to manage it yourself.File intensive operations like git clone, npm install, apt update, apt upgrade, and more are all noticeably faster with WSL 2.The actual speed increase will depend on which app you're running and how it is interacting with the file system. 8) Now, type wsl --set-version ubuntu 2 and hit enter running that command will convert our existing Ubuntu to version 2. If you reach its max size you may need to expand it.The WSL 2 VHD uses the ext4 file system. If you want faster updates, you can join the Windows To find your Windows build number (which corresponds to your WSL version), go to Cortana and type "About your PC", and press Enter. Future Linux kernel updates will be released as Windows 10 software updates — which is kinda crazy when you think about it! To make sure you can use any given version of WSL, first check which build of Windows you are running. We are working on adding this feature.WSL 2 uses a Virtual Hardware Disk (VHD) to store your Linux files. 07/22/2020; 9 minutes to read; In this article. This kernel has been specially tuned for WSL 2, optimizing for size and performance to provide an amazing Linux experience on Windows. Whereas WSL 1 used a translation layer that was built by the WSL team, WSL 2 includes its own Linux kernel with full system call compatibility. (We are looking into ways to improve this experience.

If your distribution grows in size to be greater than 256GB, you will see errors stating that you've run out of disk space. Follow the instructions to WSL 2 is only available in Windows 10, Version 2004, Build 19041 or higher.

You can fix this error by expanding the VHD size.Find your distribution installation package name ('PackageFamilyName')Resize your WSL 2 VHD by completing the following commands:Launch your WSL distribution (Ubuntu, for example).Make WSL aware that it can expand its file system's size by running these commands from your Linux distribution command line:In general do not modify, move, or access the WSL related files located inside of your AppData folder using Windows tools or editors. 3. Consider using WSL 1 if:A traditional VM experience can be slow to boot up, is isolated, consumes lots of resources, and requires your time to manage it. wsl --set-version 2. WSL 2 has a virtualized ethernet adapter with its own unique IP address. )Here's an example PowerShell command to add a port proxy that listens on port 4000 on the host and connects it to port 4000 to the WSL 2 VM with IP address 192.168.101.100.WSL 2 distributions currently cannot reach IPv6-only addresses.

WSL 2 does not have these attributes.WSL 2 provides the benefits of WSL 1, including seamless integration between Windows and Linux, fast boot times, a small resource footprint, and requires no VM configuration or management. This means that you will need to make sure your application can accept LAN connections.For example, you may need to bind your application to When using a WSL 1 distribution, if your computer was set up to be accessed by your LAN, then applications run in WSL could be accessed on your LAN as well.This isn't the default case in WSL 2. Unlike when you use the graphical interface, this command also shows the minor version number of your installed Ubuntu version in the Description field (if applicable). - Obtain the IP address of your host machine by running this command from your Linux distribution: The picture below shows an example of this by connecting to a Node.js server running in Windows via curl.When using remote IP addresses to connect to your applications, they will be treated as connections from the Local Area Network (LAN). But I’ll save you from information overload. However, there are a few specific scenarios where you might prefer using WSL 1. Awesome, you have successfully moved to WSL 2! The VM that powers WSL 2 distros is something that we aim to manage entirely for you, and so we spin it up when you need it and shut it down when you don’t. Microsoft introduced the second version of the Linux Subsystem in the latest version 2004 of Windows 10. Benefits include:A whole new set of apps that you can run inside of WSL, such as Any updates to the Linux kernel are immediately ready for use.

The primary goals of updating the Windows Subsystem for Linux to a new version are to increase file system performance and support full system call compatibility.. WSL 2 uses the latest and greatest in virtualization technology to run a Linux kernel inside of a lightweight utility virtual machine (VM). Comparing WSL 1 and WSL 2. In a command prompt, run systeminfo. This VHD automatically resizes to meet your storage needs and has an initial maximum size of 256GB. Close the powershell and enjoy the new version. In Linux, you can also find the kernel information in the file /proc/version. Initial versions of WSL 2 run up to 20x faster compared to WSL 1 when unpacking a zipped tarball, and around 2-5x faster when using git clone, npm install and cmake on various projects.Linux binaries use system calls to perform functions such as accessing files, requesting memory, creating processes, and more. 2.