Is it possible for an application (written in Mono C#) to run a console command?

Posted by Razick on Ask Ubuntu See other posts from Ask Ubuntu or by Razick
Published on 2012-09-30T15:16:38Z Indexed on 2012/09/30 15:49 UTC
Read the original article Hit count: 248

I am wondering if a Mono C# application can somehow run a terminal command. For example, could the user give the program his or her password and then have the application run

sudo apt-get install application-name

(console requests password)

password

(console requests confirmation)

y

Preferably, this would be done without actually opening a terminal visible to the user, so that the application could provide the necessary feedback and manage the whole operation cleanly with as little user interaction as possible.

Is there a way to do that? Let me know if clarification is needed. Thank you!

© Ask Ubuntu or respective owner

Related posts about command-line

Related posts about application-development