Fix "firefox is already running" issue in Linux

From http://kb.mozillazine.org/Profile_in_use - Check for:

1) A file called .parentlock
-AND-
2) A symlink called lock
...in ~/.mozilla/firefox/random string of alphanumeric characters.default/

The former is present while Firefox is running to prevent more than one different instance from trying to simultaneously write to the same set of profile files, and if Firefox is not closed cleanly, neither may be removed.

Error message received in this case should be:

From anywhere in the filesystem (or removing this if pwd reports ~/.mozilla/firefox/random string of alphanumeric characters.default), replacing random string of alphanumeric characters with the FF profile folder on your computer, do rm ~/.mozilla/firefox/random string of alphanumeric characters.default/.parentlock ~/.mozilla/firefox/random string of alphanumeric characters.default/lock` (assuming the first sentence pans out) to remove them, if there isn't a Firefox process running.

More less-authoritative information here.


  1. First find the process id of firefox using the following command in any directory:

    pidof firefox
    
  2. Kill firefox process using the following command in any directory:

    kill [firefox pid]
    

Then start firefox again.

Or you can do the same thing in just one command.As don_crissti said:

kill $(pidof firefox)

Usually, many users say this command helps:

killall -SIGTERM firefox

The killall command will killall processes that are named "firefox". SIGTERM is the kill-signal type. This command works well for me and other Linux users. Also, it may help to wait thirty seconds after closing Firefox before it is turned back on.