win10 wsl 添加开机启动任务
1302
|
2021-06-23 10:59:00
计算机 > 管理 > 系统工具 > 任务计划程序 > 创建基本任务





%windir%\System32\bash.exe
参数 -c "/home/username/init.sh"
完成,编辑属性

init.sh 文件内容
#! /bin/bashpassword='yourpassword'echo $password|sudo -S service nginx startecho $password|sudo -S service ssh start