Skip to content
Follow
Ubuntu Linux

How to Manage Logout Prompt on Ubuntu Linux

Richard
Written by
Richard
Feb 1, 2023 Updated Sep 15, 2026 3 min read
Enable Automatic Suspension in Ubuntu Linux Easily
Enable Automatic Suspension in Ubuntu Linux Easily

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.

Advertisement

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.

⚡ Quick Answer

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`.

Advertisement

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.

Ubuntu Linux activities overview Terminal search
Ubuntu Linux activities overview Terminal search

To turn off the logout prompt, type this command and press Enter:

gsettings set org.gnome.SessionManager logout-prompt false

Advertisement

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:

Advertisement

sudo apt install dconf-editor

The App Center also offers installation by searching for "Dconf Editor."

ubuntu linux decon editor install
Ubuntu Linux decon editor install

After opening Dconf Editor, follow these steps:

  • Navigate to: org -> gnome -> gnome-session
  • Find the logout-prompt setting in the list.
  • Toggle the switch to On to enable the prompt.
  • Toggle the switch to Off to disable the prompt.
Ubuntu Linux turn on or off log out prompt
Ubuntu Linux turns on or off the log-out prompt.

Once finished, the computer follows the new rule the next time anyone tries to sign out.

Advertisement
Ubuntu Linux logout prompt
Ubuntu Linux logout prompt

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)

Was this helpful?
Richard

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.

Advertisement

📚 Related Tutorials

Enable Remote Desktop on Ubuntu Linux
Ubuntu Linux Enable Remote Desktop on Ubuntu Linux
Enable Mobile Hotspot on Ubuntu Linux
Ubuntu Linux Enable Mobile Hotspot on Ubuntu Linux
Enable or Disable Dim Screen in Ubuntu Linux
Ubuntu Linux Enable or Disable Dim Screen in Ubuntu Linux
How to Add Desktop Icons in Ubuntu Linux
Ubuntu Linux How to Add Desktop Icons in Ubuntu Linux

No comments yet — be the first to share your thoughts!

Leave a Comment

Your email address will not be published. Required fields are marked *