WSL 会自动关机吗?

关闭 terminal 后一段时间会自动关闭。

The WSL instance still shuts down automatically when all WSL terminals are closed, after waiting for a while. · Issue #9968 · microsoft/WSL

Enable systemd to WSL

Just add the following lines to /etc/wsl.conf:

[boot] 
systemd=true

在最新的 Ubuntu release 中(24.04)默认是打开的。

WSL 开机自启动并在后台运行

How to change default user in WSL Ubuntu

ubuntu2204.exe config --default-user root

Run Windows binary from WSL

How to SSH into WSL2 on Windows 10 from an external machine

Run Docker in WSL without Docker Desktop

付费文章:Running Docker in WSL2 Ubuntu Distro without Docker Desktop | by Utkarsh Shigihalli | Medium