As we know sometimes gnome is getting hung or frozen , and maybe we have important things running and we don’t want to log out or reboot to fix the freeze issue. In such scenario we can restart gnome shell to try to recover gnome .
Method 1 : If your gnome desktop still responds , you can press
F2 then type
r then press
Enter , then gnome-shell will be restarted
Method 2 :Alternatively , if you can use below command to restart gnome shell
Method 3 : If your gnome desktop is getting hung completely , you can try to switch to other tty by press
Fn is required) , then login as the same user the run above kill command then press
Fx to switch back to your gnome desktop.