首页 > 系统相关 >windows wsl2 开启systemd

windows wsl2 开启systemd

时间:2022-10-14 13:59:01浏览次数:53  
标签:bin systemd windows wsl distrod install -- wsl2

WSL2 启用systemd

安装方法 一
1.确保默认的WSL本版为2 powershell

wsl --set-default-version 2

2.下载并解压缩 distrod_wsl_launcher,解压提取exe
3.按照提示安装自己需要的发行版本
4.(可选)若需要发行版本在Windows开机时启动,请在WSL中以下命令

sudo /opt/distrod/bin/distrod enable --start-on-windows-boot

安装方法 二(在现有发行版中安装)
1.在wsl发行版中下载并运行最新的安装程序脚本

curl -L -O "https://raw.githubusercontent.com/nullpo-head/wsl-distrod/main/install.sh"
chmod +x install.sh
sudo ./install.sh install

2.启用wsl-distrod
随windows开机启动

/opt/distrod/bin/distrod enable --start-on-windows-boot

否则

/opt/distrod/bin/distrod enable

3.重新启动你的发行版
关闭wsl,在powershell中执行:

wsl --shutdown

重新打开一个wsl窗口

标签:bin,systemd,windows,wsl,distrod,install,--,wsl2
From: https://www.cnblogs.com/yangtao416/p/16791366.html

相关文章