How to start Firefox web browser from terminal in private mode?

Simply put, how do I open the Firefox directly from Mac OS X Terminal in private mode?


You can start Firefox directly in a private window, at least two ways, in a Terminal. The first is using the open command.

open -a Firefox --args -private-window

In a Terminal, type man open and press Enter for a synopsis of the open command.

  • Note: When passing command line arguments to the application being opened by the open command they go with and after the --args argument.

Another way is to use the fully qualified pathname of the Firefox executable, e.g.:

/Applications/Firefox.app/Contents/MacOS/firefox -private-window &
  • See Firefox Command Line Options for additional arguments when starting Firefox from the command line.

  • It's better to use the open command because while the use of the ampersand & at the end of the command line will allow the prompt to return in the Terminal nonetheless closing the Terminal will also close Firefox, where it doesn't terminate Firefox started with the open command when the Terminal is closed.