Linux - Log out of Unity or Gnome from Command Line Terminal

To log out of Gnome or Unity from the command line, simply run this command:


It will prompt you to click the 'log out' button. To log out without being prompted, run this command:

gnome-session-quit --no-prompt

This should work in any Linux distribution (Ubuntu, Debian, openSUSE...) that is using Unity, Gnome, or a Gnome based desktop environment.

Ubuntu Unity - Fix Window Border Decorations Gone - How to Restore Borders that Disappeared

Occasionally, the window decoration borders disappear in Ubuntu's Unity. It looks like the image below when this happens. To fix this problem and restore the borders to the windows, press Alt + F2 and run the following command:


Ubuntu Unity Borders Gone

Subscribe to Unity