21

If i wanted to run an application from the terminal (linux, ubuntu), how do I do so so that the terminal is still usable or that so if I close the terminal, the application still runs.

Braiam
  • 35,991

1 Answers1

41

If you just want to use the terminal interactively again, run the command in the background by appending & after the command:

some_command &

If you want the application to continue functioning after closing the terminal as well, use nohup:

nohup some_command &

All STDOUT and STDERR will be redirected to the file $PWD/nohup.out.

Or disown:

some_command & disown

Both nohup and disown will make some_command immune to SIGHUP.

Check man nohup and help disown to get more idea on these.

heemayl
  • 56,300