Glossary

nohup

nohup ("no hangup") runs a command so that it ignores the SIGHUP signal, letting it survive the closing of its controlling terminal. Output is redirected to nohup.out in the current directory unless explicitly redirected.

nohup ./long-job.sh &                    # run in background, survives logout
nohup ./job.sh > job.log 2>&1 &          # redirect output explicitly
nohup ./job.sh < /dev/null > log 2>&1 &  # fully detach

On a modern system with tmux or screen, those are usually a better tool for long-running interactive work. nohup is still the right choice for one-shot, fire-and-forget scripts, and it requires nothing beyond coreutils.

Related terms: disown, tmux, screen, Signal

Discussed in:

This site is currently in Beta. Contact: Chris Paton

Textbook of AI · Textbook of Usability · Textbook of Digital Health

Auckland Maths and Science Tutoring

AI tools used: Claude (research, coding, text), ChatGPT (diagrams, images), Grammarly (editing).