How can I restart my GUI (X window server) from command line without rebooting the system? Which process(es) do I need to kill and do they automatically restart?


All you need to do is restart LightDM as root, like so:

sudo restart lightdm
  • You should probably mention that you should do this from a TTY (virtual terminal). – RolandiXor Sep 16 '16 at 17:19
  • I was guessing from the level of detail of the question that Mr. Wolf knows his way around the terminal. :) – Fred Rocha Sep 16 '16 at 18:15
  • I wasn't just referring to the "terminal", but oh well. (I said virtual for a reason. I mean the thing you get when you press ctrl+alt+f-key-of-your-choice). – RolandiXor Sep 17 '16 at 22:30
  • Oh, I see. And what would the advantage be in this case? How would that work? Curious myself now. :) – Fred Rocha Sep 18 '16 at 12:35

This worked for me:

sudo service lightdm restart

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.