6

Could someone remind me how do I run application through the terminal, which allow me to close the terminal after the program is open. I totally forgot how to do this. Please let me know.

Radu Rădeanu
  • 174,089
  • 51
  • 332
  • 407

2 Answers2

7
(command &) && exit

Example:

(firefox &) && exit
Radu Rădeanu
  • 174,089
  • 51
  • 332
  • 407
2

I think this is the best way:

nohup (command) &> /dev/null & 

example:

nohup firefox &> /dev/null &

Edit: the "&> /dev/null &" redirects the output of nohup such that you do not have logs (nohup.out) See https://unix.stackexchange.com/questions/23010/how-to-make-nohup-not-create-any-output-files-and-so-not-eat-all-space

enter image description here

Then I can close terminal without a warning message either by the exit command or by clicking the x on the terminal window

kamil
  • 7,397