lixuanyy
V2EX  ›  问与答

[Windows10 WSL]如何开机启动特定发行版 wsl 的 ssh

  •  
  •   lixuanyy · May 8, 2021 · 2127 views
    This topic created in 2004 days ago, the information mentioned may be changed or developed.

    各位大佬,有一个开机自启动 wsl 里面 ssh 的需求,并且我电脑上存在好几个发行版的 wsl 。 我用 Windows 的任务计划程序开机启动的 wsl 里面的 ssh,结果每次都启动的是 Ubuntu18,而不是我要的 Debian 开机执行的脚本是

    %windir%\System32\bash.exe -c "echo zxcv1234 | sudo -S /etc/init.d/ssh start"
    

    求大郎指教如何改成启动 Debian 的 ssh

    3 replies  •  2021-05-08 14:40:03 +08:00
    Puteulanus
    Puteulanus
    May 8, 2021❤️1
    1
    我是计划任务运行 wsl -d 指定的
    lcdtyph
    lcdtyph
    May 8, 2021 via iPhone❤️1
    2
    在计划任务里用 wsl -d 指定 debian
    lixuanyy
    lixuanyy
    OP
    May 8, 2021
    3
    @Puteulanus
    @lcdtyph
    好的,感谢两位大郎😁
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   5318 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 02:10 · PVG 10:10 · LAX 18:10 · JFK 21:10
    ♥ Do have faith in what you're doing.