How to run Firefox in private browsing mode from the command line or a shortcut

Private browsing mode is a feature of the Firefox browser designed to not record the history of your web surfing. When you open a new private window, Firefox does not retain cookies, temporary internet files, history, and other data related to your browsing activities. When the Private browsing session window is closed, this data is cleared. Additionally, Firefox will reset the clipboard content for better privacy. Private Browsing mode can be activated in settings, there you can enable it permanently so Firefox always runs in private mode. However, you might want to run it usually in normal mode and only have a shortcut instead to run Firefox in private mode.


To do this, Mozilla Firefox supports a special command line switch, -private-window, which tells the browser to start the private browsing session.
The command line must be like this:

firefox -private-window

Note the hyphens before 'private' and 'window'. You can type the above command directly in the Run dialog (press Win + R shortcut keys on the keyboard and press Enter after typing it).
firefox private switch
It will work even if you don't enter the full path to firefox.exe because Firefox adds a special run alias to run the browser directly.
firefox private window
You can create a shortcut to this command and also assign a global hotkey for this shortcut to open the Private Browsing mode directly, as described in this article: Add global hotkeys to launch your favorite applications in Windows 8.1.

2 thoughts on “How to run Firefox in private browsing mode from the command line or a shortcut

  1. Wellington Torrejais da Silva

    Thanks!

    Like or Dislike: Thumb up 0 Thumb down 0

    Reply
    1. Sergey Tkachenko Post author

      You are welcome.

      Like or Dislike: Thumb up 0 Thumb down 0

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *