Open Bartiik opened 4 years ago
I'm afraid I don't think it is possible. The reason I think this is the case is when I look at Ubuntu under the WSL, it looks like this:
Now I'm not getting exactly the details I'd need to confirm this, but I believe that what is happening here is that the conhost
program is actually running a wsl
process, which is itself hosting ubuntu
. This means that ubuntu
is not simply an app with a stdin
and stdout
which we can pipe data to and from, it really does need to be hosted in the conhost
environment.
However, by inspecting where the ubuntu executable actually is, then running cmd
then running the ubuntu executable - I get this:
Now unless I am mistaken, what I'm seeing here is actually bash
telling me that it doesn't recognise commands like ls\r
- which makes sense, because I'm on windows - so when I hit enter, bash
sees ls\r\n
- linux only needs the \n
as a linefeed (Windows uses carriage return then linefeed).
So it looks suspiciously like it might work with a bit of tweaking (I forget, but I think running cmd
will create a conhost
process, but it's been a while since I looked into the internals) but in it's current state, it's not supported I'm afraid
Hey, same as in the title, do you know the way to open the Ubuntu subsystem, if it's been installed on my PC? I cannot find the proper process to type in Console.StartProcess and parameters. Thanks for any help :)