Show HN: NSL – WSL for Linux
NSL brings the WSL2-style isolated container environment to Linux hosts using a shared virtual machine running systemd-nspawn containers.
summary is enough The landing page explains the core concept quickly, while the comment section clarifies how it differs from alternatives like Distrobox.
summary
NSL (NSpawn Subsystem for Linux) replicates the WSL2 development experience on Linux by running systemd-nspawn containers within a shared virtual machine. Unlike tools that mount the host home directory directly, NSL provides strong workspace isolation to keep host environments free from breaking dependency changes. It supports multiple signed Linux distributions, maps host files and ports selectively, and integrates with Wayland for GUI apps. The project is currently in pre-release, aiming to offer a clean UX for containerized local development.
key points
- NSL uses a shared VM model running systemd-nspawn containers, providing isolation similar to WSL2.
- Unlike Distrobox, NSL does not mount the host home directory by default, protecting host system hygiene.
- It supports seven signed Linux distributions and maps host files, network ports, and Wayland windows into the container environment.
who should read it
Linux developers looking for an isolated, WSL-style containerized workflow to keep their host systems clean.
discussion positive
consensus
Commenters immediately compared NSL to existing tools like Distrobox, Toolbx, and LXC, prompting the author to clarify that NSL's primary distinction is its lack of a default home directory mount and WSL2-like VM isolation.
pushback
Some users argued that containers are overkill or that tools like Nix, mise, or native systemd-nspawn can achieve the same host hygiene without a VM layer.
Distrobox mounts $HOME in the container at $HOME by default. WSL and NSL do not, and that's my preference. This means you can install tools that change your default path, change your dotfiles, etc, without affecting the host. The other obvious difference is that distrobox is powered by podman or docker, while NSL uses a VM that runs systemd-nspawn containers.
The author explains the exact architectural differences between NSL and Distrobox, specifically regarding home directory mounting and VM-backed execution.
Generated by an LLM from the article and thread. Check the sources before relying on it.