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

Printer-friendly versionPDF version
Linux - Log out from command line

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

gnome-session-quit

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.

Post new comment