I have a bash script that takes several hours to run. While it's running, I would like to do other things, which may involve logging out or disconnecting from the internet (my script runs network tests on various computers).
I understand that there is a command that would allow me to run my tests from a remote terminal and logout of the terminal while it runs. Does anyone know what this command is?
Answer
The command you are looking for is nohup.
There is also screen, which is for when you want to leave something running but come back and reattach interactively later.
nohup is simpler if a command expects no user input after launch, and screen is better if you want to be able to run the program interactively.
No comments:
Post a Comment