Answer the question
In order to leave comments, you need to log in
How to access the Linux Terminal in a C# console application?
All the best! I solve a problem. You need to access the application to the Linux terminal. wrote the code.
static void terminalInput(string command)
{
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = "/bin/bash";
startInfo.Arguments = "~/test";
Process.Start(startInfo);
}
#!/bin/bash
touch test.txt
echo "hi world! > test.txt"
Answer the question
In order to leave comments, you need to log in
the shell understands, but the c# code does not know what a tilde is
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question