Thursday 8 July 2010

how to keep program running after closing ssh session

I first tried <command> &  - but that only put the program in the background when disconnecting it terminted the job

I then tried nohup <command> & detaching it supposedly from the terminal but it did not work either

 I then found a program called screen

sudo apt-get install screen 


To start an shell app just type

screen -Amd command



Once it's running, press Ctrl-a (control and a at the same time), then press d

to re-attach to it later, login with ssh and type

screen -r