keep program running after logout in linux

1. Run the program with nohup, meaning no hang up. A program started with nohup command will keep running until it finishes even after you logged out of the remote server.

nohup ./ &

1. Use the screen tool


Then press Ctrl-a d, you should now safe to logout and the script will still be running until it finishes.

2. Run the script in the background and then disown it.

./ #start the script
ctrl+z #To pause the program and get backt to the shell window.
bg #To run it in the background.
jobs #To display the current jobs running.
disown -h %[jobnumber] #To disown the job, so it will still be running even if you logged out.

Search within Codexpedia

Custom Search

Search the entire web

Custom Search