Quantcast
Channel: Active questions tagged windows-subsystem-for-linux - Ask Ubuntu
Viewing all articles
Browse latest Browse all 2796

Using a batch file on Windows to automate Ubuntu in WSL

$
0
0

I'd like to automate Ubuntu through a single-click batch file in Windows.

I can just start ubuntu, but if I add /k cd "path", it just doesn't do anything. It exits with no error.

I'd like to do an automation so that I can click a batch file in Windows and:

  • open Ubuntu in WSL
  • cd to path
  • activate an environment
  • cargo run
  • ... and then leave Ubuntu running in the same instance

... but WSL doesn't seem to behave as I'd expect. I don't understand.

This question is really close, but I have tried it and can't get it to work.


Viewing all articles
Browse latest Browse all 2796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>