Chapter4 Working with Remote Machines
Maintaining Long-Running Jobs with nohup and tmux
1. nohup
Because the nohup command is catching and ignoring these hangup signals, the program you’re running won’t be interrupted.
$ nohup program1 > output.txt &
[1] 10900
nohup returns the process ID number (or PID), which is how you can monitor or terminate this process if you need to (covered in “Killing Processes” on page 51). Because we lose access to this process when we run it through nohup, our only way of terminating it is by referring to it by its process ID.