I never know when's the best time to use nohup and the & at the end of the command.
Linux – When should I use “nohup”, and when should I use “&”
linuxunix
Related Topic
- Linux Bash – How to Sort du -h Output by Size
- Linux – Using nohup when initial input is required
- Linux Web Server – Proper Permissions for Website Files and Folders
- Linux – Run a part of script shell in nohup
- ifconfig vs iproute2 – Should You Quit Using Ifconfig?
- Linux – nohup create multiple process
- How to run nohup when prompted for password and/or input parameter
Best Answer
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.