I'd like to open a new (Ubuntu) WSL2 session in Windows Terminal and run a command in it using a script or just a single line of code in Windows Command Prompt.
It seems pretty hard to me. I only got to this:
wt -w 0 nt -p "Ubuntu" -d \\wsl$\Ubuntu\home
where -w 0
tells to create a new tab in existing WT windows (if already present), nt
is new-tab command (can be omitted), -p <>
indicates the profile to run, -d <>
the starting directory.
But how to pass a command to run?