Home

Nohup

Nohup is a command-line utility that allows a program to continue running after the user logs out. The name stands for "no hang up." It is commonly used to start long-running or background tasks on Unix-like systems.

It works by protecting the launched command from the hangup signal (SIGHUP) and by handling its output.

Use and behavior: Nohup is commonly employed for long-running tasks on remote servers where you want the

Availability: Nohup is widely available on Unix-like systems. On Linux it is typically provided by GNU coreutils,

If
stdout
or
stderr
are
not
already
redirected
when
nohup
is
invoked,
they
are
redirected
to
a
file
named
nohup.out
in
the
current
working
directory.
When
the
command
is
started
in
the
background
(for
example
with
an
trailing
ampersand),
the
shell
typically
prints
the
process
ID
of
the
started
job.
A
typical
invocation
is:
nohup
mycommand
arg1
>
logfile.txt
2>&1
&.
If
you
omit
redirections,
output
may
be
written
to
nohup.out.
process
to
continue
after
you
disconnect.
It
is
not
a
true
daemon
and
does
not
fully
detach
from
the
terminal
in
all
respects.
It
does
not
automatically
restart
the
process
or
manage
failures;
for
robust
background
services,
more
specialized
solutions
such
as
systemd,
or
terminal
multiplexers
like
screen
or
tmux,
are
often
preferred.
and
it
is
also
present
on
BSD
variants
and
macOS.
Users
should
ensure
appropriate
logging
and
consider
dedicated
daemon
management
when
reliability
is
critical.