I would like to start Ubuntu WSL [shell: bash
] inside Windows Terminal from a batch file and pass a command, which should immediately run after startup.
- When directly starting WSL, I'm able to do this using the
-c
argument; e.g. the following opens WSL and establishes an SSH connection with some local port forwardings:bash -c "ssh -L 3306:localhost:3306 -L 5900:localhost:5900 -L 8001:localhost:8001 [email protected]"
How would I achieve this using Windows Terminal?
/etc/rc.local
script,crontab
, etc., of which bypasses the Windows side of it altogether?