How to Manage Logout Prompt on Ubuntu Linux
The logout prompt in Ubuntu Linux is a warning box that asks you to confirm your choice before ending your desktop session. This safety check stops you from accidentally closing open apps and losing unsaved work.
Recent releases like Ubuntu 22.04 LTS and 24.04 LTS include an option to turn off this confirmation screen so you can log out faster. You can disable the prompt by changing a preference in your system settings.
You can manage the Ubuntu logout prompt using the Terminal or Dconf Editor. In the Terminal, use `gsettings set org.gnome.SessionManager logout-prompt false` to disable it or `gsettings reset org.gnome.SessionManager logout-prompt` to enable it. Dconf Editor allows toggling the `logout-prompt` setting under `org -> gnome -> gnome-session`.
Turn on or off log out prompt on Ubuntu Linux
You can turn the Ubuntu logout prompt on or off using the terminal to prevent accidental logouts and lost work. Running a quick gsettings command lets you disable the confirmation screen so your desktop logs out instantly, or turn the warning back on whenever you want extra safety.

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
You can disable or enable the Ubuntu logout prompt using Dconf Editor (a tool for changing hidden desktop settings) if you prefer a visual menu over the terminal. Installing this app and changing a single preference lets you control the logout warning without typing commands.
Installing this application must happen first. Open the terminal and run this command:
sudo apt install dconf-editor
The App Center also offers installation by searching for "Dconf Editor."

After opening 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, the computer follows the new rule the next time anyone tries to sign out.

Conclusion
Managing the Ubuntu logout prompt helps prevent accidental data loss by stopping you from signing out by mistake. Keep in mind that this setting only protects your open files from slips of the mouse, and it does not block other people from using your computer.
Keep in mind that this setting only prevents accidental data loss rather than acting as a security barrier against unauthorized users. For more information on managing the system, see How to add or remove software on Ubuntu Linux.
What is the logout command in Linux?
The logout command terminates all processes either with the same controlling terminal as the present process or with all processes which have this terminal open. Processes that are not children of the present process are terminated upon access to the terminal. The present process is also terminated.
How do I turn off login prompt in Ubuntu?
Disabling automatic login follows a similar path. Navigate to Settings System Users, unlock the panel with a password, and toggle the Automatic Login button off. That completes the process.
Was this guide helpful?
100% of readers found this helpful (1 votes)
About the Author
Richard
Tech Writer, IT Professional
Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.
No comments yet — be the first to share your thoughts!