The most important Firefox command line options

The Firefox web browser supports a number of command line options that it can be run with to customize startup of the web browser.

You may have come upon some of them in the past, for instance the command -P "profile name" to start the browser with the specified profile, or -private to start a new private browsing session.

The following guide lists important command line options for Firefox. It is not a complete list of all available options, as many are used only for specific purposes that have little to no value to users of the browser.

You find the complete listing of command line options on the Firefox Developer website. Note that many of the command line options work in other Mozilla-based products, even third-party programs, as well.

Important Firefox command line options

firefox command line

Profile specific options

  • -CreateProfile profile name -- This creates a new user profile, but won't start it right away.
  • -CreateProfile "profile name profile dir" -- Same as above, but will specify a custom profile directory on top of that.
  • -ProfileManager, or -P -- Opens the built-in profile manager.
  • -P "profile name" -- Starts Firefox with the specified profile. Profile manager is opened if the specified profile does not exist. Works only if no other instance of Firefox is running.
  • -no-remote -- Add this to the -P commands to create a new instance of the browser. This lets you run multiple profiles at the same time.

Browser specific options

  • -headless -- Start Firefox in headless mode. Requires Firefox 55 on Linux, Firefox 56 on Windows and Mac OS X.
  • -new-tab URL -- loads the specified URL in a new tab in Firefox.
  • -new-window URL -- loads the specified URL in a new Firefox window.
  • -private -- Launches Firefox in private browsing mode. Can be used to run Firefox in private browsing mode all the time.
  • -private-window -- Open a private window.
  • -private-window URL -- Open the URL in a new private window. If a private browsing window is open already, open the URL in that window instead.
  • -search term -- Run the search using the default Firefox search engine.
  • -url URL -- Load the URL in a new tab or window. Can be run without -url, and multiple URLs separated by space can be opened using the command.
Read also:  How to migrate from Adblock Plus to uBlock Origin

Other options

  • -safe-mode -- Starts Firefox in Safe Mode.  You may also hold down the Shift-key while opening Firefox to start the browser in Safe Mode.
  • -devtools -- Start Firefox with Developer Tools loaded and open.
  • -inspector URL -- Inspect the specified address in the DOM Inspector.
  • -jsconsole -- Start Firefox with the Browser Console.
  • -tray -- Start Firefox minimized.
Article Name
The most important Firefox command line options
The Firefox web browser supports a number of command line options that it can be run with to customize startup of the web browser.
Ghacks Technology News
Please share this article


Responses to The most important Firefox command line options

  1. ams October 8, 2017 at 7:45 am #

    "safe mode" is oxymoronic here, isn't it? It means you'll be launching your browser bare naked, without the benefit of any extensions (inclusive of adblocking and privacy addons).

    "Safe Mode is a special Firefox mode that can be used to troubleshoot and fix problems. Safe Mode temporarily turns off hardware acceleration, resets some settings, and disables add-ons"

    Safe Mode is a debugging startup mode available in Firefox, Thunderbird, and SeaMonkey 2, where all added extensions are disabled, the default theme is used, and default localstore settings (toolbar settings and controls) are used. Safe Mode also disables hardware acceleration, the Just-in-time (JIT) JavaScript compiler, and any changes made via userContent.css and userChrome.css. Any changes made to preference settings remain in effect in Safe Mode, however, and all available plugins are used. To summarize:

    Safe Mode temporarily affects the following:
    All extensions are disabled.
    The default theme is used, without a persona.
    The Just-in-time (JIT) JavaScript compiler is disabled.
    The userChrome.css and userContent.css files are ignored.
    The default toolbar layout is used.
    Hardware acceleration is disabled.

    Safe Mode has no effect on the following:
    The status of plugins is not affected.
    Custom preferences are not affected.

    After reading "all that", I still honestly don't know whether SafeMode flat-out disables javascript execution

    (and, looking forward, wonder whether SafeMode suppresses asm.js execution)

    • riri0 October 9, 2017 at 6:16 am #

      I am very sure you are trying your hardest to not be a troll, but sure, enjoy urself trying hard to troll at the same time.

  2. Helpful-reader October 8, 2017 at 7:57 am #

    On Mac you can bring up Firefoxe's Profile Manager by holding down the option (alt) key while launching FF.

  3. Rick A. October 8, 2017 at 12:53 pm #

    Martin, Soren, Pants, Chef-Koch, anybody, what's going on with Dash in Firefox / YouTube? it doesn't fully buffer the video anymore or do anything regardless if i have media.mediasource.enabled set to true or false and if i right click on YouTube's video player and left click on "Stats For Nerds" which looks totally different now, Dash is no longer listed. Can anybody tell me anything please? is there a new preference that will handle anything like this which i doubt? is there anyway to get the video to fully buffer again? is Scroogle just throttling the download speeds on YouTube now so Dash is irrelevant ?

    Martin's article on Dash and an add-on i was using to give me a toggle button so i could quickly toggle media.mediasource.enabled without having to go to about:config every time which i guess is now abandoned because the developer will not respond if he plans on making it a web extension or not, if he even can make it a web extension. i'm sure someone here, maybe one of the people i mentioned at the beginning of this comment will know if it could be made a web extension or not, i would think that it could.

    • Anonymous October 8, 2017 at 6:02 pm #

      > YouTube doesn't fully buffer the video anymore or do anything regardless if i have media.mediasource.enabled set to true or false

      Yes, it's the new version of YouTube, they must have done something to prevent full buffer, but it's possible that some add-ons can fix it for you. I didn't look into the change at all, just confirmed that even with MediaSource disabled YouTube still doesn't buffer the whole video, so I don't know which web standard they use to achieve that, could be just regular JS, in which case a solution may be to use a NoScript surrogate or some Grease/Violentmonkey script. But there may exist specific add-ons whose only purpose is to fully buffer YouTube videos, the question being are they updated to work with the new YouTube player yet.

  4. dmacleo October 8, 2017 at 8:55 pm #

    or point shortcut to waterfox exe....

  5. lehnerus2000 October 9, 2017 at 11:52 am #

    Will these still be available once FF57 arrives?

    • Martin Brinkmann October 9, 2017 at 12:38 pm #

      Yes they will.

      • lehnerus2000 October 10, 2017 at 5:04 pm #

        Thank you Martin. :)

  6. A different Martin October 10, 2017 at 1:22 am #

    Thanks, Martin -- this is useful info to squirrel away for future reference, and because it's limited to Firefox, it's easier to read than Mozilla's page.

    For what it's worth, it doesn't seem to matter whether the profile switch is uppercase (-P) or lowercase (-p), at least in Windows. I accidentally used a lowercase switch in my Firefox shortcuts and my two Firefox installs open with their correct respective profiles regardless. I vaguely remember that Linux is strictly case-sensitive when it comes to command-line entries. I have no idea whether OSX is, but since OSX is based on BSD, I'm guessing it might be as well. Best to play it safe and stick with an uppercase -P. You do not want to accidentally open a carefully curated pre-55 profile in a 55+ Firefox, or vice versa. (I know, because I've done it. Thankfully, I had recent backup profiles on hand.)

Leave a Reply