Each time when I want to close terminal there is a popup with question "Close this terminal?" because some process is running in terminal. I don't care about this process. How to prevent terminal from showing this popup?

  • running the command in terminal with nohup COMMAND & disown can sometime fix it - this is useful if it is a GUI program like gedit or nautilus. – Wilf Jul 18 '14 at 21:44

In 16.04 you'll find that choice in dconf-editor. You can install it, if necessary, with

sudo apt install dconf-editor

Then go to

org -> gnome -> terminal -> legacy

and uncheck confirm-close.


You will have to install gconf-editor first. Just open the terminal using Ctrl+Alt+T and type the following command:

sudo apt-get install gconf-editor

After that, hit Alt+F2 or open the Dash and type gconf-editor and the configuration editor window will appear. Then you go to AppsGnome-terminalglobal and uncheck the option confirm_window_close.


  • It seems like there is nothing under Apps called Gnome-Terminal. However, there is desktop /desktopapplicationsterminal under which such option does not seem to exist, only exec and exec_arg. – Anders Lindén Dec 27 '16 at 21:57
  • 1
    This works for MATE terminal too, but you have to use dconf-editor, the key is under org.mate.terminal.global – Joril May 9 '17 at 8:37
  • This answer is out-of-date now. The correct answer for modern Ubuntu installations is Hinz's answer – Jonathan Landrum Feb 28 '18 at 16:04

Just press Ctrl + C to cancel any background process that may be running and then you can close the terminal without the popup showing up.


You can affect your system by closing the terminal with background processes running. A good example is if there is an update or upgrade running, the apt command can get locked up and you may start getting these errors:

E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?

Luckily, they have been solved in this question.

That is just an example of what may happen if you close the terminal when a background process is running. Other things may happen depending on the process itself.

  • 2
    +0. You meant well, but I don't think Ctrl+C stops background processes at all. Please test your answers before you post them. – unforgettableidSupportsMonica Aug 4 '17 at 0:20
  • This is a warning, not an answer. – Hinz Jan 25 '18 at 15:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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