Imagine a situation where you need to download a large file from the internet to a remote server.
You run curl https://download.com -o download
and logout of the ssh server. Big mistake! you come back hours later just to see that the download ended as soon as you logged out.
The nohup
command helps here. nohup
stands for no hold up, and will run the command without any external interruptions. you can further run the command in the background using &
.
Here’s the example:
$ nohup curl https://download.com -o download &