Uploaded December 2022 | Updated September 2026, 2 weeks ago
Microsoft allows Systemd under WSL2 so it's standard Linux now, right? Not so! In an apparent attempt to keep Windows performance up, WSL is exited within 8 seconds of closing your last Linux Terminal. So if you're planning on writing background services for hosting JupytertLab (for instance) you're tethered to a black terminal window no better than an Anaconda install.
It appeared that the global .wslconfig file in your Windows User Home directory could solve it with a vmIdleTimeout entry set to milliseconds, but my tests confirm that it doesn't, even after a wsl --shutdown. .wslconfig is like a global option for /etc/wsl.conf with different options. The documentation says these optons only work on Windows 11. So if you're trying to write Linux daemons under systemd on wsl, beware.
Microsoft is still working out the gotcha's, and so now the LXD container system that I yanked out of my process recently due to Microsoft's backporting Windows 11's WSL features to Windows 10 is starting to look more appealing again. WSL is not standard Linux no matter what you might hear.
Microsoft allows Systemd under WSL2 so it's standard Linux now, right? Not so! In an apparent attempt to keep Windows performance up, WSL is exited within 8 seconds of closing your last Linux Terminal. So if you're planning on writing background services for hosting JupytertLab (for instance) you're tethered to a black terminal window no better than an Anaconda install.
It appeared that the global .wslconfig file in your Windows User Home directory could solve it with a vmIdleTimeout entry set to milliseconds, but my tests confirm that it doesn't, even after a wsl --shutdown. .wslconfig is like a global option for /etc/wsl.conf with different options. The documentation says these optons only work on Windows 11. So if you're trying to write Linux daemons under systemd on wsl, beware.
Microsoft is still working out the gotcha's, and so now the LXD container system that I yanked out of my process recently due to Microsoft's backporting Windows 11's WSL features to Windows 10 is starting to look more appealing again. WSL is not standard Linux no matter what you might hear.










