What I currently do on Mac OS X Terminal is, run a program, then quit the terminal and open a new one to start a new program.

Surely there is some way to close current program and return me to the command line?

  • 1
    It would help if you could edit your question to clarify a few things. When you say "quit" the terminal, do you mean you close the terminal window/tab, or do you mean you quit the Terminal application (Terminal > Quit Terminal)? What sort of program are you talking about? Are you trying to run long-running commands in the background, or are you unsure of how to exit particular programs?
    – Chris Page
    Aug 21, 2011 at 11:57

4 Answers 4


Alternatively you can put a & at the end of the command so that it runs in the background. eg. gitk & instead of just gitk to allow you to use the command line after running the command line before the process you started ends.

  • 4
    In addition to this: You can kill a running program that hasn't returned the prompt with Ctrl-C You can put a running program in to the suspended state with Ctrl-Z and then tell it to continue running in the background by immediately typing bg at the prompt you get back. Once you've backgrounded a process you can kill it with kill <processid>.
    – Ian C.
    Aug 13, 2010 at 15:17

You could run the app using nohup and &. nohup means that the program will carry on running even when the terminal window is closed eg

nohup ./appname &
open -a AppName

This will launch an app and immediately return to the shell as long as it's in your Applications folder. If it isn't, you can provide the full path to the app bundle.


ctrl+c is what I was wanting :)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .