linux/nohup

No Hangup

Run commands immune to hangups

process
background
persistent

Command

nohup

Explanation

nohup runs commands that continue running after the user logs out.

Examples

Run script in background

nohup python script.py &

Run with output redirect

nohup ./long_running_job > output.log 2>&1 &