Dec 21
Using ‘nohup’ to persist a process even after logging out
Spent a while today trying to remember this command. I needed it to persist a one-off backup process which I needed to leave running. I knew I seen this done before but couldn’t remember the command. My initial searches kept turning up the wrong info. Now I’ve found it I don’t want to forget it again.
Basically you use the ‘nohup’ command which runs another command and immunizes it against hangup signals. You also have to use the ‘&’ shell operator to run this process in the background. Then you can log out of your terminal and leave the process to run. E.g.
$ nohup myprocess &
