.TH nohup "" "" Command
.PC "Run a command immune to hangups and quits"
\fBnohup \fIcommand \fB[\fIarguments\fB\^]\fR
.PP
The command
.B nohup
tells the \*(CO shell to execute
.I command
while ignoring all hangup and quit signals.
.PP
If you do not redirect the output of \fIcommand\fR,
.B nohup
redirects both the standard output and the standard error into the file
.BR nohup.out .
If
.B nohup.out
cannot be created in the current directory,
.B nohup
redirects all output into the file
.BR $HOME/nohup.out .
.PP
.B nohup
is often used to execute scripts or pipelines that would normally abort 
if you logged out during the middle of execution.
.SH Examples
If
.B file
is a shell script, then the command
.DM
	nohup sh file
.DE
.PP
executes the contents of
.B file
in the foreground while ignoring all quit or hangup signals.
The command
.DM
	nohup sh file &
.DE
.PP
executes
.B file
in the background; you can log out safely and all the contents of
.B file
will still be executed.
.SH "See Also"
.Xr "commands," commands
.Xr "kill," kill
.Xr "ksh," ksh
.Xr "sh," sh
.Xr "signal()" signal
