0

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?

1 Answers1

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 somename to place the command in the foreground
  • Press Ctrl+AD to place it back in the background
AdminBee
  • 22,803
Garo
  • 2,059
  • 11
  • 16