WSL2 is the second version of Windows Subsystem for Linux, unlike the previous WSL1 that worked in an intermediate layer, this new one works with a Linux kernel on the fly that translates the calls of the Linux system to the calls of the Windows NT system. This technology allows the use of Gnu / Linux distributions such as Ubuntu, Debian, Kali, Fedora and SUSE. It is geared for developers who work with the terminal focusing on tools that work by command line. The reasons to implement are The first is to improve the performance of the WSL itself, as this, due to the need to translate the instructions from Linux to Windows NT and the superimposition of the Linux file system on NTFS, can be up to 20 times slower than using Linux directly on the physical machine. Second, we will try to improve compatibility by running a more real and complete Linux environment. WSL 2 will use version 4.19 of the kernel, which we remember is LTS. Using a kernel with Azure project optimizations will allow you to achieve full compatibility with Linux at the system call level and ensure that Docker containers can run smoothly on Windows as well as implement support for file systems based on the FUSE mechanism.
Additionally, WSL2 significantly increased I / O performance and file system operations, which used to be a WSL1 bottleneck.
For example, when unpacking a compressed WSL2 file, WSL1 is 20 times faster than WSL1, and when performing the “git clone”, “npm install”, “apt update” and “apt upgrade” operations from 2 to 5 times.
The innovation comes with Windows Terminal provides a tabbed interface and shared windows, fully supports Unicode and escape sequences for color output, allows changing themes and plugins, supports virtual consoles (PTY) and uses DirectWrite / DirectX to speed up the representation of the text.