Last Updated: February 25, 2016
·
10.22K
· necraidan

Restart Gnome Shell from the console

Ever since I used Gnome Shell Extensions, I've been feeling the need to restart the shell from the console, because its bugs sometimes.

Switch to the console using CTRL+ALT+F1 (to switch back to the DISPLAY use CTRL+ALT+F7).

Then, find out which display you're using by using the "w" command.
In the FROM column you'll see your display. Most of the time it's ":0".

Export that display from the console using the following command:

export DISPLAY=:0.0

After that enter this following command :

gnome-shell --replace

And switch back with CTRL+ALT+F7 to retrieve your desktop with gnome