Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Possible Duplicate:
How do I keep jobs running after logout?

I'm on a Mac and I SSH into my Ubuntu box and run node.js (or any other application), but when I close out of the terminal on my Mac, it quits the process on the Ubuntu box. How can I let the process continue running independent of the terminal on my Mac?

share|improve this question

marked as duplicate by Doug Harris, Ignacio Vazquez-Abrams, random Oct 22 '10 at 14:47

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.

2 Answers 2

Couple of things you can do. "CTRL + z" will stop the running process, then you can type "bg" to background it to keep it running. OR You can just start the command with "&" at the end of the line. This will start it as a background process. Then you can exit the shell.

share|improve this answer

One solution would be to use GNU Screen. It's a 'multiplexer' which in this case means it will allow you to have multiple virtual terminals open with one connection. The cool thing about is it that when you 'detach' (or close) from screen, it will not only continue whatever processes were running; it will keep that terminal open in the same exact state that you left it in.

So step-by-step of how you'd do this:

  1. enter 'screen' on your terminal.
  2. press enter to get past the license screen
  3. do whatever you need to do on that terminal. (the shortcuts for screen are here: http://www.pixelbeat.org/lkdb/screen.html)
  4. when you're done, you want to 'detach' (ctrl-a d)
  5. when you want to come back, do 'screen -R' to go to your last screen session. everything should be there as you left it, with stuff running and whatnot.
share|improve this answer

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