Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
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 '11 at 11:57
up vote 4 down vote accepted

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.

share|improve this answer
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 '10 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 &
share|improve this answer
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.

share|improve this answer

ctrl+c is what I was wanting :)

share|improve this answer

You must log in to answer this question.

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