Kali Linux enhances its performance with an upgraded WSL2 interface featuring a modern interface.
Kali Linux enhances its performance with an upgraded WSL2 interface featuring a modern interface.
I recently noticed Kali Linux has been updated to make using WSL2 with a GUI significantly simpler. You no longer have to configure servers or install complex software—just run the straightforward app named 'kex'. Video reference:
At the end of the day it runs on Windows, which puts it at a performance disadvantage due to overhead. Don't have to layer Hyper-V on top of that, right? I think WSL works like containerization such as LXC or Docker. I'll need to check if that's correct.
WSL1 operated without a complete Linux kernel, causing some system calls to be unavailable while others were translated into Windows equivalents. This blurred the line between WSL and Windows, resulting in slower internal I/O but faster interaction with the host system. In contrast, WSL2 uses a full Linux kernel within a compact virtual environment, improving file operations and making all system calls accessible. Accessing the host filesystem became noticeably slower, though this is less critical due to alternative methods for file transfers. External access can be handled via a simulated network interface or through VS Code's Remote WSL extension, offering a cleaner experience compared to traditional file path navigation in WSL2 (except for shared network paths). Running with the full kernel enables features like ACL support, which was previously unavailable. While WSL1 had its merits and allowed users to avoid dedicated Linux setups, WSL2 enhances usability for development tasks and small projects without compromising performance significantly for internal operations.
I think it's not complete virtualization since with WSL you can still see file paths inside and outside the Linux guest. These paths can affect each other, meaning they're connected rather than fully isolated. It seems to be a compatibility layer in place.
It’s a streamlined setup with minimal hardware impact. Custom virtual switches aren’t feasible, but it supports a full Linux kernel and requires a dedicated virtual machine. As mentioned earlier, WSL1 allows direct rootfs access via local paths like C:\Users...\rootfs. WSL2, however, needs the network share path \\wsl$\[distro]. This environment is ideal for managing multiple distributions with diverse servers. The host filesystem is accessed through a remote protocol (9p), which can be handled by a standard VM. WSL2 abstracts this complexity, but it introduces performance overhead due to the remote protocol. I tested a basic project with TypeScript, Mocha tests, and Grunt setup. Running grunt commands on the WSL2 VM took about 2 seconds, whereas on the host it took roughly 12 seconds. IO speeds inside WSL2 were notably faster—up to 2000% improvement in sequential reads and writes compared to WSL1. That’s around 80-90% of the performance seen in a HyperV VM. It’s quite impressive!