WSL2开启Systemd
一、确认已经安装好WSL2。【什么是WSL2】
二、安装daemonize
sudo apt-get install daemonize三、执行以下命令
sudo daemonize /usr/bin/unshare --fork --pid --mount-proc /lib/systemd/systemd --system-unit=basic.target
exec sudo nsenter -t $(pidof systemd) -a su - $LOGNAME四、检查是否运行成功:
systemctl list-unit-files效果图:
