Run a command immune to hangup signals (SSH disconnects).
low risk
nohup runs a command that won't be killed when the terminal session ends (SIGHUP is ignored). Output goes to nohup.out by default. A quick alternative to tmux/screen for one-off long-running commands.
nohup ./long-script.sh &Run script in background, immune to hangup · explain & risk-check →nohup python3 server.py > server.log 2>&1 &Run with custom log file · explain & risk-check →echo $!Get PID of last backgrounded process · explain & risk-check →Always redirect both stdout and stderr with `> out.log 2>&1` when using nohup — otherwise output goes to nohup.out in whatever directory you ran it from.
Reference text is hand-written and may be incomplete — check man nohup for your version. Test destructive commands on a non-production system first.