1

This question already has an answer here:

Executing a program in the terminal with a command such as ./theprogram runs the program, but waits until the program closes. This is useful if you want to see the output of the program, but what if you just want to execute the program and keep working in that terminal while the program is running?

marked as duplicate by Stephen Kitt, Community Mar 23 '15 at 15:02

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

5

You have two basic options. If you've already started the program, hit CTRL-Z to suspend it, then run bg to put that job into the background and let it keep working. If you haven't started the job yet, start it by running ./theprogram & to put it in the background right away.

  • Why would the & operator do this? – Alex Mohr Mar 23 '15 at 14:57
  • Because that's how it's defined... See gnu.org/software/bash/manual/bashref.html#Lists-of-Commands for details. – Stephen Kitt Mar 23 '15 at 15:04
  • Ah I was thinking of && with that comment. – Alex Mohr Mar 23 '15 at 15:15
  • && is a bash "and" operator to string together two different commands, executing the second command only if the first command exists successfully. – John Mar 23 '15 at 15:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.