Jobs and Background Execution

nohup

Runs a command immune to terminal hangup.

nohup starts a command so it keeps running after the controlling terminal closes, with output commonly redirected to nohup.out unless you choose another file.

Syntax
nohup command [args...] &

Arguments explained

  • command is the program to start.
  • & backgrounds the command in the shell.
  • Output should usually be redirected explicitly.

Common examples

Run after logout
nohup ./long-job > long-job.log 2>&1 &

Starts a job that keeps running and writes output to a log file.

Check background jobs
jobs

Shows the shell job if it belongs to the current shell.

nohup Command
FieldDetails
Commandnohup
CategoryJobs and Background Execution
Primary useRuns a command immune to terminal hangup.
Syntaxnohup command [args...] &