I'd like to launch an executable file(application) from a bash script, exit the script, close the terminal and let the application run by itself. How can I do that?
Asked
Active
Viewed 528 times
1 Answers
2
NOHUP is indeed the 'standard' solution. But I usually use
screen -s somecommand -S somename -d -m
This will start somecommand in session named somename in the background.
The session will stop automatically once the command ends.
Using screen has (among other things) the advantage that you can:
- Run
screen -r somenameto place the command in the foreground - Press Ctrl+AD to place it back in the background