Restart cinnamon from command line

When cinnamon freezes up and needs to be restarted, you can restart it from Cinnamon itself or from a different terminal.

In Cinnamon

Press ALT+F2. Type in the letter r and press enter.

On the command line

To switch to another console terminal, press CTRL+ALT+F2.
On this terminal, type this command.

pkill -HUP -f "cinnamon --replace"



  1. User sim at

Logout from Different Desktop Environments from Command Line


Some people spend all day in terminals, even though there’s a desktop environment running. I normally have four different terminals open on my main screen, in a normal quadrant pattern. I arrange them on the taskbar so they are clockwise, starting in the upper left quadrant.


Suppose you want to close your session, without having to use the mouse or pressing the Super key or anything like that.

You want to enter a command from your terminal that will close your session. Here is a list of how to do that, for each different desktop environment (DE) I’ve collected so far.

Logout from desktop environments

Logout from cinnamon from command line

cinnamon-session-quit --logout --force

Logout from xfce from command line

xfce-session-quit -l

Logout from GNOME Shell from command line


Logout from KDE4 from command line

qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.logout -1 -1 -1

Logout from KDE5 from command line

With confirmation

qdbus org.kde.ksmserver /KSMServer logout 1 3 3

Without confirmation

qdbus org.kde.ksmserver /KSMServer logout 0 3 3

Logout from desktop environment from command line

loginctl terminate-user username



  1. Cinnamon
  2. Gnome
  3. KDE4
  4. KDE5 Plasma
  5. Extra reading for KDE