How to Manage Logout Prompt on Ubuntu Linux
This guide explains how to turn the logout confirmation screen on or off in Ubuntu Linux. This article has been tested on Ubuntu 22.04 LTS and 24.04 LTS.
Why: By default, Ubuntu asks if you are sure you want to log out. This prevents you from closing your programs by mistake. Turning it off makes logging out faster but removes the safety net.
What happens when done: If you turn the prompt off, your computer will close your session immediately when you click the logout button. If you turn it on, you will see a confirmation box every time.
Turn on or off log out prompt on Ubuntu Linux
Note: These settings are specific to the GNOME desktop environment. They may not function on Ubuntu flavors like Kubuntu (KDE) or Xubuntu (XFCE).
You can change this setting using the Terminal. First, open the Terminal by pressing CTRL + ALT + T on your keyboard.

To turn off the logout prompt, type this command and press Enter:
gsettings set org.gnome.SessionManager logout-prompt false
To turn the prompt back on, type this command and press Enter:
gsettings reset org.gnome.SessionManager logout-prompt
Disable or enable the logout prompt using the Dconf Editor
If you prefer using a visual menu instead of typing commands, you can use the Dconf Editor. If you are familiar with Windows, you know about Windows Registry Editor.
Ubuntu uses the Dconf Editor to change advanced system settings. You must install it first. Open your Terminal and run this command:
sudo apt install dconf-editor
You can also install it via the App Center by searching for “Dconf Editor.”

After opening the Dconf Editor, follow these steps:
- Navigate to:
org->gnome->gnome-session - Find the
logout-promptsetting in the list. - Toggle the switch to On to enable the prompt.
- Toggle the switch to Off to disable the prompt.

Once finished, your computer will follow your new rule the next time you try to sign out.

Conclusion
You now know how to customize your logout experience. Whether you prefer speed or safety, these tools give you full control.
Please remember that this is a data-loss prevention setting. It helps you avoid closing your work accidentally, but it is not a security authentication measure. For more information on managing your system, see How to add or remove software on Ubuntu Linux.
Was this guide helpful?
Leave a Reply Cancel reply