Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am wondering if a Mono C# application running in Ubuntu 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)


(console requests confirmation)


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? If so, how? Let me know if clarification is needed. Thank you!

share|improve this question

closed as too localized by qbi, gertvdijk, jrg Jan 16 '13 at 3:02

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

This question is specifically related to Linux, namely Ubuntu, therefore, this is an appropriate place to post this question. I appreciate the downvote based on your tentative opinion regarding classification however. –  Razick Sep 30 '12 at 15:53
Other questions of this nature are allowed, so this one should be, too. –  Scott Severance Oct 1 '12 at 1:56
"Development on Ubuntu" is explicitly ontopic in the FAQ, voting to reopen. –  Jorge Castro Oct 3 '12 at 1:27
Could you share a link to the question on SO? –  Flimm Nov 29 '12 at 17:21
too localized ha, I love it when I find a askubuntu question which exactly matches my need and it is closed, because apparently it is unlikely to help me. I'm so glad you made that decision on my behalf. –  trampster Apr 23 '13 at 5:59