익명 14:23

When should I use "nohup", and when should I use "&"?

When should I use "nohup", and when should I use "&"?

I never know when's the best time to use nohup and the & at the end of the command.



Top Answer/Comment:

Nohup makes a program ignore the HUP signal, allowing it to run after current terminal is closed / user logged out. Nohup does not send program to background.
& at the end of command is related to shell job control, allowing user to continue work in current shell session.
Usually nohup and & are combined to launch program which runs after logout of user and allows to continue work at current shell session.

상단 광고의 [X] 버튼을 누르면 내용이 보입니다