what is the command to restart firefox from the command line?

how to restart firefox from the command-line. I have already given as "firefox". Is this the right command to restart the firefox?


First kill all processes that is named Firefox which means killing the existing running firefox then run it again

pkill firefox
firefox &

At least in my version, Firefox doesn't have a restart option. You can kill the process and then start it again. For example:

killall firefox
firefox

If killall doesn't cut it, you can use pkill instead. Just keep in mind that pkill would kill any process with firefox in its name, though probably that's not a big concern.


Update

In the address bar write

  1. about:profiles
    then press the Tab button a couple of times to select the Restart Normally or the Restart with Add-ons Disabled button on the loaded page, and finally press Enter.

  2. about:restartrequired then press Enter (it should be already selected else you can always press Tab).


Under Linux it is possible to use from command line

pkill -f firefox && firefox 2>/dev/null &

killing all the processes with word firefox in the whole (full) command line, redirecting the error log to /dev/null; maybe after checking with pgrep -fl firefox.


It's a command line but an internal one...

Press ShiftF2, write restart in the opened bar (at the very bottom), then press enter.

On old versions, e.g. the 41.0.2, it was needed to write the word true too: restart true.

Some words more

It's possible to force firefox to restart through the Developer Toolbar, usually accessible via ShiftF2 or via menu (Firefox/Tools >> Web Developer >> Developer Toolbar in the English version).

A bar will be opened in the bottom of the page where it will be possible to write the command

restart

It is possible to use restart --nocache true or restart --nocache false in order to force it the refresh of the tabs content or to use the local cached instead. It can result useful the --safemode option too.

You can find some words more and the old synopsis on another answer of mine on SuperUser.