PDA

View Full Version : [ubuntu] How to keep a task running after closing my remote login session?



cuthbertkao
June 9th, 2008, 02:21 AM
Hi,

How to keep a task running after closing my remote login session?

For my work, I have to remote log into our Ubuntu server to run some tasks, but, sometimes, one task may take even more than one hour to finish. I would like to keep it running after I close my connection session. However, I couldn't find a way to do that. Could transferring the owner of a running task to another user do that or is there any other way? Thanks in advance.


Cuthbert

squaregoldfish
June 9th, 2008, 10:17 AM
The nohup command is what you're after:


nohup <command> &

Will start the command, but it won't be killed when you log out. The standard output from the command is written to a file named nohup.out, so you can look at it later.

Steve.

kpkeerthi
June 9th, 2008, 11:24 AM
Use screen (http://www.rackaid.com/resources/linux-tutorials/general-tutorials/linux-screen.cfm)