Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to implement a keyboard shortcut to restart gnome-shell whenever this one crashes (some bugs aren't currently fixed just yet). For this I would need a command line to restart the shell.

The Alt+F2 and restart command won't work when the shell is crashed because the prompt is implemented in the shell.

Hence, how to restart the gnome-shell from command line?

share|improve this question
up vote 18 down vote accepted

The command to replace the gnome-shell would be gnome-shell --replace.

From the manual page of gnome-shell:

--replace             Replace the running window manager
share|improve this answer
Thanks I wasn't sure --replace = "restart". – Benjamin Jan 31 '12 at 15:56

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

share|improve this answer

The command should just be gnome-shell --replace.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.