linux nohup (1)

How do I run Linux command so it keeps going when I logout?

There are several ways, one is to use nohup.

I've put the command in a +x chmod'd script file and done something like this:

nohup bash script_file > script.log 2>&1 &

to run it. This redirects all the output to script.log.

You want to make sure you specify options on the command so that it doesn't expect user input. You can get around that by including something like < /dev/null after the command in the script.

Wikipedia has a good article on this and other methods here:


Add a Comment

NOTE: Comments are moderated and will not show until approved.