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, introducing important changes such as a real Linux kernel, through a subset of Hyper-V features. Since June 2019, WSL 2 is available to Windows 10 customers through the Windows Insider program, including the Home edition.
I upgraded to wsl2 today, it runs a lightweight Hyper-V VM with a real Linux kernel so there is no syscall translation layer needed, all programs work perfectly now, htop for example, doesn't work in wsl 1 before.
The upgrade is straight forward: wsl –set-version Ubuntu 2
, it took a while to upgrade, I guess it copies large amount files to a new partition, I find turning off real time virus and thread protection in windows 10 could speed thing up, and wsl -l -v
could list all workloads in the system.
Files under /mnt/c, mnt/d etc, are fully maintained by use of a filesystem bridge using the 9P protocol.
To install wsl fresh, please follow: https://docs.microsoft.com/en-us/windows/wsl/install-win10
scripts: https://gist.github.com/dcai/c5418bcf9203cf19c93a
other cli commands might help: pages