How to Manage Logout Prompt on Ubuntu Linux
The logout prompt on Ubuntu Linux lets you confirm whether you really want to end your session.
This prompt is a safety feature that pops up with a question like “Are you sure you want to log out?” before it closes all your open programs. It helps stop you from accidentally logging out when you don’t mean to.
You can control this confirmation in your user settings. For example, this works on Ubuntu 22.04 LTS and 24.04 LTS.
Turning off the prompt makes logging out quicker, but you lose that extra check. If it’s on, you’ll always see the confirmation. If you turn it off, clicking logout will just end your session right away.
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 easily turn the Ubuntu logout prompt on or off using a command in the Terminal. This setting helps prevent you from accidentally closing your work without saving when you log out.
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
You can change the Ubuntu logout prompt setting using a graphical tool called Dconf Editor. This program lets you adjust advanced system settings without needing to type commands, making it easier for many users.
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
Adjusting the Ubuntu logout prompt is a good way to avoid losing your unsaved work. It acts as a helpful reminder before you log out, preventing accidental data loss, though it doesn’t add security against unauthorized access.
Just a reminder: this setting helps prevent accidental data loss, like closing your work without saving. It’s not a security feature, though, so it won’t protect your system from unauthorized access. For more information on managing your 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?
You can disable automatic login the same way. You go to the Settings → System → Users and then unlock it with your password and toggle the Automatic Login button off. That's it.
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!