info > nohup

📛 NAME

nohup — run a command immune to hangups

🚀 Quick Reference

Use CaseCommandDescription
Run command immune to hangupsnohup COMMAND [ARG]...Runs COMMAND with hangup signals ignored, redirecting output to nohup.out if terminal
Redirect output to custom filenohup COMMAND > FILECaptures output to FILE instead of nohup.out
Run in backgroundnohup COMMAND &Runs command in background immune to hangups
Portable nohup (non-GNU)nohup COMMAND 0>/dev/nullRedirects stdin to /dev/null for portability

📖 DESCRIPTION

nohup runs the given COMMAND with hangup signals ignored, so that the command can continue running in the background after you log out.

📋 SYNOPSIS

nohup COMMAND [ARG]...

🔍 Details

If standard input is a terminal, redirect it so that terminal sessions do not mistakenly consider the terminal to be used by the command. Make the substitute file descriptor unreadable, so that commands that mistakenly attempt to read from standard input can report an error. This redirection is a GNU extension; programs intended to be portable to non-GNU hosts can use nohup COMMAND [ARG]... 0>/dev/null instead.

If standard output is a terminal, the command's standard output is appended to the file nohup.out; if that cannot be written to, it is appended to the file $HOME/nohup.out; and if that cannot be written to, the command is not run. Any nohup.out or $HOME/nohup.out file created by nohup is made readable and writable only to the user, regardless of the current umask settings.

If standard error is a terminal, it is normally redirected to the same file descriptor as the (possibly-redirected) standard output. However, if standard output is closed, standard error terminal output is instead appended to the file nohup.out or $HOME/nohup.out as above.

To capture the command's output to a file other than nohup.out you can redirect it. For example, to capture the output of make:

nohup make > make.log

nohup does not automatically put the command it runs in the background; you must do that explicitly, by ending the command line with an &. Also, nohup does not alter the niceness of COMMAND; use nice for that, e.g., nohup nice COMMAND.

COMMAND must not be a special built-in utility (see Special built-in utilities).

⚙️ OPTIONS

The only options are --help and --version. See Common options. Options must precede operands.

🚪 EXIT STATUS

If POSIXLY_CORRECT is set, internal failures give status 127 instead of 125.

nohup
📛 NAME 🚀 Quick Reference 📖 DESCRIPTION 📋 SYNOPSIS 🔍 Details ⚙️ OPTIONS 🚪 EXIT STATUS

Generated by phpman v4.10.0-7-g98e9fd5 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-09-16 02:54 @216.73.216.241
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!