Possible Duplicate:
How to clean launch a GUI app via the Terminal (so it doesn't wait for termination)?

For example, if I want to run Netbeans from the CLI, I can type:

$ /usr/local/netbeans-7.0/bin/netbeans

But by doing this, the command line is rendered useless until Netbeans has been shut down. Hitting CTRL+C to end the process will kill Netbeans and return the command line to the user but how do you launch applications while retaining control of the command line? Is it possible to run a task in the background while still using the command line?


2 Answers 2


You can put nohup in front of it and & behind it.

Nohup will take care of all the messages created by the command to not show up. The & will actually fork the command.

  • I was gonna say the exact same thing but saw your post first lol great answer! And nohup ftw :D
    – zkriesse
    Jul 9, 2011 at 19:46

If you launch something from the command line and only later decide you want to keep working in your terminal without stopping the program, you can:

  • suspend the process with "crtl + z"
  • separate the process from your terminal (and de-suspend it) with "bg"

For example, suppose you launch firefox:

$ firefox

(now the terminal is unresponsive, so type the following)

$ <Ctrl-z>

$ bg

Now if you close the terminal, firefox does not close (because it has been "backgrounded").

Note: without the "bg", the program is suspended and unresponsive.

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