You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.



Mozilla's Command Line Options

By Daniel Wang (May 7, 2003, revised June 02, 2004)

You can use command line configuration options to bypass the Profile Manager and open a specific profile (if you have multiple profiles). You can also control how Mozilla opens, which components open initially, and what the components do when they open. This page describes the commonly used options and how to use them. To see a full list of all available command line options, use the -h command.

How to Use Command Options

On Windows, right-click the Mozilla shortcut icon and choose Properties. In the Target input box of the Shortcut tab, put the command option after the quote, for example "C:\Program Files\Internet\Mozilla\mozilla.exe" -p myprofile.

On Linux or Unix, type the command option after the Mozilla command, for example, ./mozilla -p myprofile .

On Mac OS, create a text file with the following syntax:

type:TEXT
creator:MOZZ
containing:ARGS: -P myprofile

Command Options

Command Result Example
-h or -help Print the list of all available command line options. Note that on Windows this only work with debug builds (bug 26761). This option is available only in command console.  
"URL" Open URL with Mozilla mozilla "www.mozilla.org"
-turbo Launch Mozilla in Quick Launch mode  
-ProfileManager Start with Profile Manager  
-SelectProfile Start with the profile selection dialog
-ProfileWizard Start with Profile Wizard  
-CreateProfile profile_name Create a new profile named profile_name, but do not start Mozilla. profile_name must not contain spaces ( ). mozilla -createprofile JoelUser
-CreateProfile "profile_name profile_dir" Creates a new profile named profile_name in the profile_dir/profile_name directory, but do not start Mozilla. Note profile_name and profile_dir are quoted together. mozilla -createprofile "JoelUser c:\internet\moz-profile\"
-P "profile_name" Bypass Profile Manager and launch Mozilla with the profile named profile_name. Useful for dealing with multiple profiles. Note profile_name is case sensitive. mozilla -P "Joel User"
-installer Start with the Netscape 4.x migration window.  
-height xxx Set window height. mozilla -height 600
-width xxx Set window width. mozilla -width 800
-UILocale locale Start with locale resources as UI Locale. mozilla -UILocale en-US
-contentLocale locale Start with locale resources as content Locale. mozilla -contentLocale en-US
-remote remote_command (Unix/Linux only) Execute remote_command in an already running Mozilla process (see remote control). mozilla -remote "openURL(www.mozilla.org, new-tab)"
-browser Start with the browser component  
-mail Start with the mail client.  
-mail mailto_URL Start the Compose Message window for the given mailto_URL mozilla -mail mailto:me@isp.net?subject=hi
-news news_URL Start with the news client. If news_URL (optional) is given, open the specified newsgroup. mozilla -news news://server/group
-compose message_options Start with mail composer. See syntax rules. mozilla -compose "to=foo@nowhere.net"
-editor (or -edit) URL Start with editor (Composer) for the given URL (where URL is optional). mozilla -edit www.mozilla.org
-addressbook Start with address book  
-chrome chrom_URL Load the specified chrome mozilla -chrome chrome://inspector/content
-jsconsole Start with JavaScript console.  
-aim (Netscape only) Start with Instant Messenger  
-chat Starts with the IRC client, Chatzilla, if installed.  
-nosplash or -quiet Suppresses display of the splash screen. To show splash screen, use the -splash command. Note the splash screen is disabled by default on some systems.  
-v or -version Print Mozilla version. Note that on Windows this only work with debug builds (bug 26761).  

Syntax Rules

  • Command parameters containing spaces must be enclosed in quotes; for example, "Joel User".

  • Command actions are not case sensitive.

  • Command parameters except profile names are not case sensitive.

  • Blank spaces ( ) separate commands and parameters.

  • Each message option follows the syntax field=value, for example:

    • to=foo@nowhere.net
    • subject=cool page
    • attachment=www.mozilla.org
    • attachment='file:///c:/test.txt'
    • body=check this page
  • Multiple message options are separated by comma (,), for example: "to=foo@nowhere.net,subject=cool page" . Comma separators must not follow or precede spaces ( ). To assign multiple values to a field, enclose the values in single quotes ('), for example: "to='foo@nowhere.net,foo@foo.de',subject=cool page" .