Programster's Blog

Tutorials focusing on Linux, programming, and open-source

Restart Ubuntu GUI

Every now and then my GUI locks up and becomes unresponsive. This is usually shown by something like compiz eating 100% CPU usage in htop when I SSH in.

The easiest way to resolve this is to run this command to restart the lightdm service which handles the GUI. Note that you will be taken back to the login screen.

sudo service lightdm restart

References

Last updated: 18th June 2021
First published: 16th August 2018

This blog is created by Stuart Page

I'm a freelance web developer and technology consultant based in Surrey, UK, with over 10 years experience in web development, DevOps, Linux Administration, and IT solutions.

Need support with your infrastructure or web services?

Get in touch