LinuxCommandLibrary

nohup

runs a command immune to hangups

TLDR

Run command immune to hangups

$ nohup [command] &
copy
Run with output to file
$ nohup [command] > [output.log] 2>&1 &
copy
Run script in background
$ nohup [./script.sh] &
copy
Run with custom output
$ nohup [command] > [custom.out] &
copy

SYNOPSIS

nohup command [arguments]

DESCRIPTION

nohup runs a command immune to hangups. Process continues after logout.
The tool detaches from terminal. Output goes to nohup.out by default.

PARAMETERS

COMMAND

Command to run.
ARGUMENTS
Command arguments.
--help
Display help information.

CAVEATS

Combine with & for background. Output to nohup.out. Signal handling modified.

HISTORY

nohup is a classic Unix command for running processes that survive terminal disconnection.

SEE ALSO

screen(1), tmux(1), disown(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community