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:
This quickly closes all your tabs and restarts the browser.
Additionally, there is another useful argument for the restart command:
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.