Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

Possible Duplicate:
How can i keep a command started from shell on running if i logout from shell?

When i ssh into my server and launches a program and then closes the SSH, the program closes to. How do i bypass this? The program is started with a shell script.

Ubuntu 12.04 64bit Ubuntu Server 12.04 32bit (doesn't support 64bit)

share|improve this question

marked as duplicate by izx, Eliah Kagan, James Jun 6 '12 at 17:00

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.

You can use a program called screen on the remote machine.

Simply do the following:

  • connect to the remote machine.
  • Type screen process_name and replace process_name with the desired process.
  • You can later open this process with the command: screen -r.

Hope that helps :)

share|improve this answer
Will this pause the program when i disconnect? cause i wan't to be able to start my Teamspeak 3 server remotly – Emil Kjellner Jun 3 '12 at 15:45
It won't. screen is a "terminal multiplexer", you can leave it by terminating what you start, or my detaching. Detaching here is the key, screen keeps running in the background, but with no associated terminal, so the program does not terminate when you disconnect. screen is even a common choice to leave stuff running on a remote computer to which you connect through SSH once in a while. – njsg Jun 3 '12 at 16:12
@Emil: I see that you haven't marked the question as answered. Are you still facing problems ? – thelinuxer Jun 6 '12 at 14:31

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