running a lengthy app in a terminal window

Jamie Dobbs jamie.dobbs at ihug.co.nz
Wed Mar 26 21:48:56 UTC 2008


>
> Hi,
>
> often I have to ssh a ubuntu server to run a command line app, it usually
> takes a long time, is there a way to do following:
>
> 1) ssh server
> 2) run the app
> 3) close the ssh connection
> 4) later, I can ssh again to see if the app still running? possible? tips?

install the utility called 'screen'  then do the following:

1) ssh in to server
2) run the screen command which opens a 'virtual' screen
3) run the app
4) press CTRL-A-D to detach the screen session
5) log out/close ssh session
6) later on ssh back on to the machine
7) run the command screen -r to reattach the screen session and see whats
up with it

Hope that helps :-)





More information about the ubuntu-users mailing list