How to restart Firefox with a single command

There are many occasions when you need to restart Mozilla Firefox. For example, when you enable some secret hidden feature in the Firefox browser via about:config such as "Hello" in order to use the WebRTC feature, you may need to restart it. Installing or uninstalling add-ons also means you have to restart it. While it is easy to close all tabs in Firefox manually and re-launch it, I would like to share with you a faster way which involves the built-in Firefox command line.


We already covered Firefox commands to get the HTML color code, capture a screenshot of the webpage and open any folder directly from Firefox. Now, let's see how to use the command line to restart Firefox immediately.

Open Firefox and press Shift + F2 on the keyboard. Firefox will open a console / command line at the bottom of the screen. We will use this command line to execute the restart command.
Type the following text in the command box you just opened. The command is self-explanatory:

restart

Press Enter.

restart firefox

This quickly closes all your tabs and restarts the browser.

Additionally, there is another useful argument for the restart command:

restart nocache

The optional nocache argument, when specified, tells Firefox to not use the local cache to load the previous session. This can help when you want force it to refresh the content in previously opened tabs. Note that you must enter the nocache argument without the square brackets.

That's it.

3 thoughts on “How to restart Firefox with a single command

  1. MDJ

    Wow, this is so much better than using and add-on for the same matter!

    Like or Dislike: Thumb up 2 Thumb down 1

    Reply
    1. Sergey Tkachenko Post author

      Definitely

      Like or Dislike: Thumb up 0 Thumb down 0

      Reply
  2. Updator

    dont´t know if this has ever been the same, but
    restart nocache
    definitely doesn´t work, instead you have to type
    restart true
    because it´s a boolean argument that´s needed here.
    source:
    http://webcache.googleusercontent.com/search?q=cache:2KzqDawgnAsJ:pcusernet.com/questions/992382/how-to-force-to-restart-firefox/992383+&cd=10&hl=de&ct=clnk&gl=at

    Like or Dislike: Thumb up 0 Thumb down 0

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *