nohup is a command which will help us to run a programme even after logging out and immune to hangup signals.
Generally if we log out all process started will be terminated. If we want to run some process, which doesnt require human interference, even after log out, we can use nohup.
Say I have a script mymonitor.sh to monitor memory usage and it takes one hour. I want run this script in the background and collect statistics. I can run it like this
$ nohup myscript.sh &
(assuming myscript.sh has it own logic for exiting – not an endless loop)
Now the script will run even if I log out. Normally the output will be dumped in nohup.out file.