nohup - Runs a utility ignoring hangups and quits
nohup utility [argument...]
The C shell has a built-in version of the nohup command. If you are using the C shell, and want to guarantee that you are using the command described here, you must specify the full path /usr/bin/nohup. See the csh(1) reference page for a description of the built-in command.
Interfaces documented on this reference page conform to industry standards as follows:
nohup: XPG4, XPG4-UNIX
Refer to the
reference page for more information
about industry standards and associated tags.
The name of a command to be invoked.
Optional arguments required by the
specified for invokation.
The nohup command runs utility, ignoring all hangups and QUIT signals. You can use this command to run programs in the background after logging off the system. To run a nohup command in the background, add an & (ampersand) to the end of the command.
If nohup output is redirected to a terminal or is not redirected at all, the output is appended to the file nohup.out. If the file is created, the permission bits are set to Owner Read and Owner Write (600). If nohup.out is not writable in the current directory, the output is redirected to $HOME/nohup.out. If neither file can be created nor opened for appending, utility is not invoked.
If standard error is a terminal, all output written to standard error is appended to the file receiving standard output.
The nohup command accepts just one utility as an argument. To apply nohup to a pipeline or list of commands, enter the pipeline or list in a shell script file. Then run sh as utility using the following format: nohup sh -c file
[Compaq] You can also assign the shell file execute permission and run it as the utility in the form: nohup file
utility, rather than the term
command, describes the argument to
shell compound commands, pipelines, special built-in programs, and the like,
cannot be handled directly. In addition, the term
includes user application programs and shell scripts, not just the standard
The nohup command returns the following exit values: The specified utility was found, but could not be invoked. The error occurred in the nohup utility or the specified utility could not be found.
The exit status is otherwise that of the
To leave a command running after logging out (sh only), enter: nohup find / -print &
The following environment variables affect the execution of
Provides a default value for the internationalization variables
that are unset or null. If
is unset or null, the corresponding value from the default locale is used.
If any of the internationalization variables contain an invalid setting, the
utility behaves as if none of the variables had been defined.
If set to a non-empty string value, overrides the values of
all the other internationalization variables.
Determines the locale for the interpretation of sequences
of bytes of text data as characters (for example, single-byte as opposed to
multibyte characters in arguments).
Determines the locale for the format and contents of diagnostic
messages written to standard error.
Determines the location of message catalogues for the processing
Determines the search path that will be used to locate the
command to be invoked.
Standard output and standard error file for
Commands: csh(1), ksh(1), nice(1), Bourne shell sh(1b), POSIX shell sh(1p)