LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to run something even after logging out? (https://www.linuxquestions.org/questions/linux-software-2/how-to-run-something-even-after-logging-out-466244/)

depam 07-21-2006 09:40 AM

How to run something even after logging out?
 
Hi!

I know this may seem a dumb question but I am not really good at memorizing commands. I've read this before but I can't remember where I read it. What command should I type in so that the process will continue even after I log out? For example, I ssh on certain machine and would like to download something using the wget. After I logout, I want to continue downloading as long as the machine is up. Is that possible? How will I do it? Thanks.

Hangdog42 07-21-2006 09:59 AM

Personally I use the screen command to do such things. It is sort of like VNC for console in that you can disconnect from a screen, let it do its thing, and then reconnect from someplace else. Check out man screen for the details on how to use it.

raskin 07-21-2006 09:59 AM

append & at the end to put it in background. disown will tell shell not to terminate program on your logout. This works in recent shells. Or use nohup.

prozac 07-21-2006 09:59 AM

you could run the command in background by appending a & after the command as in
Code:

somecommand&
this will continue running even if you logout.

stug 07-21-2006 03:01 PM

I think if you put & at the end, it will still stop when you logout. & just makes it so you can continue using the same terminal session. I think what you want is $nohup <command> &

(nohup = no hangup, i think)


All times are GMT -5. The time now is 03:47 PM.