Issue
I haven't used nohup
command until today, but now I need to use it to run a command in the background.
As far as i know, i can also use the bg
command to run a process in background. So my question is, what are the differences between nohup
and bg
commands?
Solution
Processes backgrounded with 'bg' are still tied to the shell that launched them and will close when the shell closes. Processes detached with 'nohup' will run even after you log out.
Answered By - Dexirian Answer Checked By - David Marino (WPSolving Volunteer)