The most important Firefox command line options

Martin Brinkmann
Oct 8, 2017

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.

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.
The most important Firefox command line options
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

Tutorials & Tips

Previous Post: «
Next Post: «


  1. daneyul eb said on June 24, 2022 at 5:14 pm

    –tray or -tray does not open it minimized.

    1. Tom Hawack said on June 24, 2022 at 7:45 pm

      @daneyul eb, the article is dated 2017/10, some things have changed since.

      You can check Firefox/CommandLineOptions – MozillaWiki at []

  2. Joe said on November 6, 2020 at 5:14 pm

    -kiosk is another i don’t see there (i might be blind) puts it in kiosk mode (duh) at lauch.

    combined with -url very useful

  3. Behealthis said on March 18, 2020 at 10:45 pm

    Cortana and Search go separate ways. You find a search bar and a Cortana button on the Windows taskbar in the new Windows 10 release.

  4. Mahesh said on March 14, 2018 at 7:36 am

    With the latest update, “-private-window URL” stated having a weird behavior. It opens the page in the private window but opens a non private empty window as well!

  5. sludge7051-x said on January 28, 2018 at 1:35 am

    . . . I got lots of help with it, getting my questions answered, I just combined it into something useful.

    . . . If I know someone likes it, and finds it useful, that’s worth a lot more to me, thanks!

    If you look at the top of the “Instructions” tab, I see that I started experimenting with how to do this 12/30/09 . . . so, it’s taken me 9 years to get it to this point.

    . . . But, I had this big breakthrough in automation only recently, after FF57 came out (11/14/17), and SQLite Manager no longer worked.

    Yes, please let me know how it works for you, or if I can answer any questions.

  6. sludge7051-x said on January 8, 2018 at 9:30 pm

    Here’s what I figured out. There’s too much to put here, so, I’ve put it on a 4-page PDF on my Google Docs:

    4 Ways to get to Firefox “Other Bookmarks”, from slowest to fastest
    The following are 4 macros that I have in Excel 2010.
    The first two just use VBA.
    The second two use NirCmd.

    1. v00p said on January 23, 2018 at 10:10 pm

      Thanks sludge7051-x for those VBS x Nircmd alternatives.
      I’m trying to launch my FF’s bookmark library at a specific location (bookmark’s folder)…
      Unlike Google Chrome’s bookmark manager, which assign an unique URL for each bookmark folder created, FF provide literrally no way to use it’s bookmark manager (library) efficiently.. Would you think of any possible way we could use nircmd to point to any one of those from the command line ?

      1. sludge7051-x said on January 26, 2018 at 11:51 pm

        I just posted this (I thought it could be useful to others). My solution is to just get all the bookmarks into Excel, and then work with them there:

        Firefox Bookmarks to .xlsm [SOLVED] . . .

      2. v00p said on January 27, 2018 at 9:54 pm

        @sludge7051-x, That my friend, is awesome. Have you made this in 6 days only ?
        I haven’t actually tried it yet, but I’v read that first post describing what and how it does..
        Trying it right now. This is some great exemple of the power of sharing & caring.. I totally appreciate (and admire this) … if you’ve got some crypto wallet pub key to provide, please put it somewhere in a signature, or pm me. I’d gladly donate for such a selfless & caring share.

        Will provide input on my experience with it.

  7. sludge7051-x said on December 19, 2017 at 5:20 pm

    I want to make a macro in Excel 2010 that goes to “Other Bookmarks” . . . I can’t figure out how to do it

    The closest I can get is, I open this, and it default opens to “All Bookmarks” . . . this is a “skin”
    “C:\Program Files (x86)\Mozilla Firefox\firefox.exe” -chrome chrome://browser/content/places/places.xul

    But, what I want is, and can only be done from within Firefox – I use this Keyboard Shortcut, and it default opens to “Other Bookmarks”
    Ctrl + Shift + B

    What I’ve tried:

    1.) VBA “Call Send Keys” from Excel 2010 does not act on Firefox

    2.) AutoHotKey is not able to communicate with Firefox: open FF, then input ^+b

    Is there an easy “switch” I can just add to the Shortcut “-chrome”?

    Or, is there a Firefox CLI, that I can use in a BAT file, and have another text file “act on” it, to open to “Other Bookmarks”? Any idea where the commands to do so are provided?

  8. A different Martin said on 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.)

  9. lehnerus2000 said on October 9, 2017 at 11:52 am

    Will these still be available once FF57 arrives?

    1. Martin Brinkmann said on October 9, 2017 at 12:38 pm

      Yes they will.

      1. lehnerus2000 said on October 10, 2017 at 5:04 pm

        Thank you Martin. :)

  10. dmacleo said on October 8, 2017 at 8:55 pm

    or point shortcut to waterfox exe….

  11. Rick A. said on 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.

    1. Anonymous said on 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.

  12. Helpful-reader said on 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.

  13. ams said on 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)

    1. riri0 said on 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.

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.