Occasionally the need to restart the GUI (desktop environment) on Ubuntu 22.04 Jammy Jellyfish arise. This usually happens whenever you encounter an unexpected error or your GUI gets “hung up”.
The objective of this tutorial is to provide an Ubuntu user with a few alternative ways how to restart / refresh GUI (graphical user interface) on Ubuntu 22.04 Jammy Jellyfish.
In this tutorial you will learn:
- How to restart GUI on Ubuntu 22.04
|Category||Requirements, Conventions or Software Version Used|
|System||Ubuntu 22.04 Jammy Jellyfish|
|Other||Privileged access to your Linux system as root or via the
# – requires given linux commands to be executed with root privileges either directly as a root user or by use of
$ – requires given linux commands to be executed as a regular non-privileged user
How to restart GUI on Ubuntu 22.04 step by step instructions
Sometimes you many need to restart/reload GUI because you may have done some changes which require it. However, occasionally you are forced to restart GUI because it froze and you do not wish to restart the entire system. In any case you might find some of the below information helpful.
- The first method is the least destructive, however, it might not provide the expected result. While logged in to your GNOME desktop press
ALT + F2key combination. Into the
Enter a Commandbox type
rand press Enter. Note that this method does not work on Wayland.
- Another alternative to do the GUI restart trick might be the most obvious to simply re-login.
- In this scenario we simply restart the
gnome-shellas non-privileged user by entering the following command in terminal.
$ gnome-shell --replace
- The following restart GUI solution is guaranteed to restart your desktop even if your GUI froze while the system is still functioning. However, it needs administrative sudo privileges. Enter the following command in terminal:
$ sudo systemctl restart systemd-logind
Either enter the
sudo systemctl restart systemd-logindcommand directly into the terminal while in GUI. However, if your GUI is frozen you may need to first change to TTY console using
CTRL + ALT + F2, login and execute command from there.
- In this method we will restart the Display Manager which will consequently also restart GNOME shell. Enter the following command:
$ sudo systemctl restart gdm
Either from GUI and TTY console
CTRL + ALT + F2execute
sudo systemctl restart gdmcommand. However, if you have deployed LightDM display manager in that case execute
sudo systemctl restart lightdmcommand.
In this tutorial, we saw how to restart the GUI on Ubuntu 22.04 Jammy Jellyfish Linux. Restarting the GUI can save you from having to do a complete system reboot when troubleshooting a system issue or making a change that requires a GUI refresh. Use whichever of the methods work best for your situation.