我想bash
从批处理文件在 Windows 终端内启动 Ubuntu WSL [shell:] 并传递一个命令,该命令应在启动后立即运行。
-c
参数来做到这一点;例如,以下命令打开 WSL 并与一些本地端口转发建立 SSH 连接:
bash -c "ssh -L 3306:localhost:3306 -L 5900:localhost:5900 -L 8001:localhost:8001 user@target.com"
Run Code Online (Sandbox Code Playgroud)
我如何使用 Windows 终端实现此目的?