How does this compare to distrobox?

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.

> WSL and NSL do not, and that's my preference.

To be fair, WSL mounts all your drives under /mnt/ by default, which I would argue isn't any better, arguably even worse.

I was wondering the same thing. Distrobox mounts $HOME by default, but it’s trivial to give a distrobox its own $HOME.

Can you explain the advantages of systemd-nspawn containers versus podman/docker? I’m not familiar with systemd-nspawn, but I’m a regular user of distrobox and podman.

Nspawn is a full system container engine with its own systemd environment, which makes it closer to LXC/Incus than Podman/Docker. You can do the single process thing in system containers or use a full init system in Docker/Podman, but the experience won't be as smooth.