WSL 2 上启用微软官方支持的 systemd( 二 )


ps --no-headers -o comm 1如果命令返回的是init说明systemd未启用 , 如果是systemd那么你的systemd已启用成功了 。
查看已启用的systemd service通过systemctl的list-units、list-unit-files命令 , 都可以很好的查看目前的systemd状态 , 命令如下:
systemctl list-units --type=servicesystemctl list-unit-files --type=service --state=enabled结束语首先希望这篇文章能够帮助到你体验到最新版本的wsl-systemd特性 , 如果有任何问题欢迎你留言 。
此外还想插两句题外话:在微软生态下开发开源项目其实是很被动的 , 因为你不知道什么时候会被官方降维打击 。为genie和distrod而感到惋惜 , 最后的最后 , RIP appget - https://github.com/appget/appget

经验总结扩展阅读