lixuanyy
V2EX  ›  问与答

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

  •  
  •   lixuanyy · May 8, 2021 · 1785 views
    This topic created in 1834 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
        1
    Puteulanus  
       May 8, 2021   ❤️ 1
    我是计划任务运行 wsl -d 指定的
    lcdtyph
        2
    lcdtyph  
       May 8, 2021 via iPhone   ❤️ 1
    在计划任务里用 wsl -d 指定 debian
    lixuanyy
        3
    lixuanyy  
    OP
       May 8, 2021
    @Puteulanus
    @lcdtyph
    好的,感谢两位大郎😁
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2985 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 04:47 · PVG 12:47 · LAX 21:47 · JFK 00:47
    ♥ Do have faith in what you're doing.