Abel Dahl asked 12 months ago
Title : What is nohup in Linux? What are its uses?

Question :

What is nohup in Linux? What are its uses?

1 Answers
Ruchin SinhaRuchin Sinha Staff answered 11 months ago

Usually when a shell script is executed on a remote linux machine connected over ssh, it takes a long time to finish. If the remote connection is aborted, the process/command will get killed. If you are not sure when the job will finish, its better to leave the job running in background even if the remote connected is aborted. This can be achieved using nohup as shown below:

nohup /path/to/script.sh arg1 arg2 &

arg1 and arg2 are optional. “jobs -l” can be used to list all the jobs.

Thanks,
Ruchin

Cubastion is among a very small number of specialized Siebel CRM Oracle Gold Partners in SME.