How to restart GNOME Shell from command line?

GNOME Shell 3.30.1 on Ubuntu 18.10

The command to replace the gnome-shell would be sending a SIGQUIT signal to gnome-shell with killall -3 gnome-shell or:

killall -SIGQUIT gnome-shell

As of GNOME Shell 3.30.1 on Ubuntu 18.10, the solution below no longer works, and will kick the user to the login screen, losing all of their work.

Before GNOME Shell 3.30.1

The command to replace the gnome-shell would be

gnome-shell --replace &

The ampersand is added to return the shell prompt after running the command; pressing Ctrl + C or closing the terminal instead would make the desktop unusable, and require a full restart.

From the manual page of gnome-shell:

--replace Replace the running window manager


The easiest way is to Alt+F2 and type r then .


Since GNOME Shell 3.30.1: You can also do a killall -3 gnome-shell.