The nohup command allows executing programs which are safe from hangup signals:

nohup COMMAND [&]

The command is not pushed in the background (see Job Control for details). Also, it does not change the niceness of the command (see Nice for details).

nohup also ensures that any output is captured and redirected to a file. The two files ./nohup.out and ${HOME}/nohup.out are tried in the presented order and, if possible, is created with 0600 permissions. If the selected file already exists, it will not be overwritten nor will its permissions be modified but instead the output is appended.

It also ensures that any output is redirected either to ./nohup.out or ${HOME}/nohup.out. If not present one of these files will be created with 600 permissions although if the file is present the permissions are not modified.

The exit code of nohup:

If COMMAND was successfully invoked, the exit code will be that of COMMAND.

Feedback is always welcome! If you'd like to get in touch with me concerning the contents of this article, please use Twitter.