Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

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.

share|improve this question

marked as duplicate by bodhi.zazen, Seth Mar 5 '14 at 18:42

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

There's a variety of methods you could use. The disown command is popular, but I've never been a fan of it. Personally, I prefer to use a multiplexer like Tmux, although screen would work as well. – Jacobm001 Mar 5 '14 at 18:17
This as not been answered. Is not the Answer am looking for. If it was I would have not posted this, as I have seen those posts before. – user242294 Mar 5 '14 at 18:39
@Braiam I don't think this Q is duplicate. I think that the OP wants a command which allows to close terminal after the program is open. – Radu Rădeanu Mar 5 '14 at 18:40
@user242294 can you explain exactly your need. it seems confusing for the community – kamil Mar 5 '14 at 18:47
@user242294 The confusion is about: do you want that the terminal to be closed manually or automatically? – Radu Rădeanu Mar 5 '14 at 19:10
(command &) && exit


(firefox &) && exit
share|improve this answer
If I close the terminal, firefox will be lost. – Braiam Mar 5 '14 at 18:28
@Braiam Which terminal are you using?!? The terminal is already closed when firefox is opened. :) – Radu Rădeanu Mar 5 '14 at 18:31
@RaduRădeanu the OP mentioned that he want to close the terminal manually – kamil Mar 5 '14 at 18:40
also, instead of firefox use gedit. – Braiam Mar 5 '14 at 18:40
@RaduRădeanu he said "allow me to close the terminal" – kamil Mar 5 '14 at 18:43

I think this is the best way:

nohup (command) &> /dev/null & 


nohup firefox &> /dev/null &

Edit: the "&> /dev/null &" redirects the output of nohup such that you do not have logs (nohup.out) See

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

share|improve this answer
Added information to prevent "nohup.out" log files. An alternate to nohup is disown or running your applications in screen, depending on what you want to do. screen tends to work well with ssh. – bodhi.zazen Mar 5 '14 at 18:35
the OP said: "allow me to close the terminal" not "close terminal automatically" – kamil Mar 5 '14 at 18:45
>& is not a syntax error. – Olli Mar 5 '14 at 19:12
@Olli then why you did the edit. by the way both works – kamil Mar 5 '14 at 19:13
I didn't edit it, rolled back the edit by @terdon – Olli Mar 5 '14 at 19:15

Not the answer you're looking for? Browse other questions tagged or ask your own question.