How to restart GUI on Ubuntu 20.04 Focal Fossa

The objective of this article is to provide an Ubuntu user with a few alternative ways how to restart / refresh GUI (graphical user interface) on Ubuntu 20.04 Focal Fossa.

In this tutorial you will learn:

  • How to restart GUI

Restarting GUI on Ubuntu 20.04 Focal Fossa

Restarting GUI on Ubuntu 20.04 Focal Fossa

Software Requirements and Conventions Used

Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Installed Ubuntu 20.04 or upgraded Ubuntu 20.04 Focal Fossa
Software gnome-shell
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

How to restart GUI on Ubuntu 20.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 bellow information helpful.



  1. The first method is the least destructing, however, it might not provide the expected result.
    Enter a restart gui Command

    While logged in to your GNOME desktop press ALT + F2 key combination. Into the Enter a Command box type r and press Enter.

  2. Another alternative to do the GUI restart trick might be the most obvious to simply re-login.
    Restart GUI by first Log Out and consequently Log In to your GUI desktop

    Restart GUI by first Log Out and consequently Log In to your GUI desktop

  3. In this scenario we simply restart the gnome-shell as non-privileged user.
    Restart gnome shell

    Open up terminal and enter the gnome-shell --replace command.



  4. 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.
    ALTTEXT

    Either enter the sudo systemctl restart systemd-logind command 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.

  5. In this method we will restart the Display Manager which will consequently also restart GNOME shell.
    ALTTEXT

    Either from GUI and TTY console CTRL + ALT + F2 execute sudo systemctl restart gdm command. However, if you have deployed LightDM display manager in that case execute sudo systemctl restart lightdm command.