nohup(1)

nohup1

Invoke a command immune to hangups

Usage

nohup utility [arg ...]

Overview

The nohup command allows the specified utility to be protected from termination if the user should become logged out (for example, due to a modem line or TCP/IP connection being dropped). To do this, nohup sets the SIGHUP signal(3) (“terminal line hangup”) to be ignored, then executes utility along with any arguments.

If the standard output is a terminal, the standard output is appended to the file nohup.out in the current directory. If standard error is a terminal, it is directed to the same place as the standard output.

If the output file nohup.out cannot be created in the current directory, nohup attempts to create the file in the user's home directory. If the file nohup.out cannot be created, either in the current directory or the user's home directory, nohup will exit without invoking utility, with an exit value as described below.

Environment

HOME

User's home directory.

Exit status

The nohup utility exits with one of the following values:

126

The utility was found but could not be invoked.

127

The utility could not be found or an error occurred in nohup.

Otherwise, the exit status of nohup shall be that of utility.

Releases

61 releases since OpenBSD 2.1; the text changed 10 times.

  1. 2.1–2.3
  2. 2.4
  3. 2.5
  4. 2.6
  5. 2.7–2.9
  6. 3.0–3.3
  7. 3.4–3.7
  8. 3.8–4.1
  9. 4.2–4.4
  10. 4.5–4.8
  11. 4.9–8.0

Standards

The nohup utility is compliant with the IEEE Std 1003.1-2008 (“POSIX.1”) specification.

nohup also exists as a built-in to csh(1), though with a different syntax.

From man 8.0-current-20261101 in OpenBSD 8.0-current (2026-11-01). Parsed by carta from the page's mdoc source.