User Agents

Chrome Command Line Parameters: A Guide

Chrome command line parameters are flags you add after the Chrome executable when launching the browser from a terminal or shortcut. They let you control behaviour that isn't exposed in the normal settings interface, such as specifying a custom user data directory, enabling experimental features, or forcing a particular proxy configuration.

What Chrome Command Line Parameters Are

Chrome is built on the Chromium open-source project, and its command line interface (CLI) accepts a long list of switches. These are strings that begin with two hyphens, for example --incognito or --user-data-dir=/path/to/folder. Some switches take a value, joined with an equals sign or provided as the next argument. The browser reads them at startup and adjusts its configuration accordingly. Many are intended for developers, testers, and system administrators; a smaller set is useful for everyday troubleshooting.

Parameters are not the same as Chrome policies. Policies are set by an administrator through the operating system or a management console and are enforced on managed devices. Command line switches are per-launch and are not persistent unless you create a shortcut or script that always includes them. They also differ from Chrome flags, which are experimental features toggled on the chrome://flags page and stored in the user profile.

How Chrome Parses Command Line Switches

When Chrome starts, it scans the command line for switches it recognises. Unknown switches are generally ignored, though some may produce a warning in the logs. Switches that require a value must be formatted correctly; for example, --proxy-server="host:port" expects a single string. On Windows, the path to the Chrome executable usually contains spaces, so the executable path must be quoted when launching from a command prompt. On macOS, you launch Chrome through the open command with the --args flag, or by running the binary inside the application bundle directly. On Linux, the google-chrome or chromium command accepts switches directly.

Chrome also uses a separate process model, so some switches affect only the browser process while others are passed to renderer or GPU processes. For example, --disable-gpu affects the GPU process, and --no-sandbox affects the sandboxing of renderer processes. Because of this, not every switch behaves identically across operating systems or Chrome versions.

Commonly Used Parameters and What They Do

The following switches are widely documented and stable enough to be useful. This is not an exhaustive list, and behaviour can change between Chrome releases.

  • --incognito — starts Chrome directly in Incognito mode, bypassing the normal window.
  • --user-data-dir="path" — uses a separate profile directory, useful for testing or keeping work and personal profiles apart.
  • --profile-directory="name" — selects a specific profile within the user data directory.
  • --proxy-server="host:port" — routes traffic through the specified proxy server.
  • --proxy-bypass-list="list" — defines hosts that should bypass the proxy.
  • --disable-extensions — starts Chrome with all extensions disabled, helpful for diagnosing extension-related problems.
  • --disable-gpu — disables GPU hardware acceleration, often used when graphics glitches occur.
  • --no-sandbox — disables the sandbox; intended for testing environments only and not recommended for normal browsing because it reduces security.
  • --headless — runs Chrome without a visible window, commonly used for automation and screenshot generation.
  • --lang="en-US" — sets the UI language for that session.
  • --start-maximized — opens the browser window maximised.
  • --new-window "URL" — opens a new window with the given URL.

Some switches are intended for debugging, such as --remote-debugging-port=9222, which exposes a DevTools protocol endpoint. These should be used with care because they can allow other local processes to control the browser.

How to Launch Chrome with Parameters

The exact steps depend on your operating system. In all cases, close existing Chrome windows first if you want the switch to apply to a fresh browser process; otherwise the new launch may hand off to the already-running instance and ignore the switch.

  1. Windows: Open Command Prompt or PowerShell. Type the full path to chrome.exe in quotes, followed by the switch. Example: "C:\Program Files\Google\Chrome\Application\chrome.exe" --incognito. To make it permanent, create a desktop shortcut, open its Properties, and append the switch to the Target field after the quoted path.
  2. macOS: Open Terminal and run open -a "Google Chrome" --args --incognito. For a persistent launcher, create an Automator application or a shell script containing the same command.
  3. Linux: Open a terminal and run google-chrome --incognito or chromium --incognito, depending on the package installed. You can also edit the .desktop file to add switches to the Exec line.

If Chrome is already running, the new process may simply open a tab in the existing window. To ensure the switch takes effect, quit Chrome completely before launching. On Windows, check the system tray for background processes; on macOS, use Cmd+Q rather than closing the window.

Risks, Limitations, and Common Problems

Command line switches are powerful but not risk-free. The --no-sandbox switch disables a key security boundary and should never be used for ordinary browsing. Switches that enable remote debugging can expose the browser to local attacks if the port is reachable. Experimental switches may cause crashes, data loss, or unexpected behaviour, and they can change or disappear without notice.

Common problems include switches being ignored because Chrome was already running, incorrect quoting of paths with spaces, and typos in switch names. On Windows, a shortcut Target field that exceeds the length limit may silently truncate. On macOS, using open without --args passes the switch to the open command rather than to Chrome. If a switch seems to have no effect, check chrome://version, which lists the command line used to launch the current browser process.

Another limitation is that some settings are overridden by enterprise policies. If a device is managed, a policy may take precedence over a command line switch, and Chrome may ignore the switch entirely. In that case, the policy is the correct place to make the change.

Parameters vs. Flags vs. Policies

It helps to distinguish three related mechanisms. Command line parameters are passed at launch and apply to that process. Flags, found at chrome://flags, are experimental features that persist in the profile until reset. Policies are administrative settings applied by an organisation and generally cannot be overridden by the user. For a one-off troubleshooting session, a command line switch is often the quickest option. For a lasting change on a personal device, a flag or a setting may be more appropriate. For managed devices, policies are the correct tool.

A common misconception is that command line switches are a way to bypass organisational restrictions or parental controls. They are not, and attempting to use them that way is both unreliable and inappropriate. Chrome is designed so that managed policies and profile supervision take precedence.

Frequently Asked Questions

Where can I see which command line switches Chrome is using?

Open chrome://version in the address bar. The "Command Line" field shows the full command used to launch the current browser process, including any switches.

Do command line parameters persist after I close Chrome?

No. They apply only to the process launched with them. To make them persistent, you must modify the shortcut, script, or desktop entry that launches Chrome.

Why is Chrome ignoring my switch?

The most common reason is that Chrome was already running, so the new launch handed off to the existing process. Quit Chrome completely and try again. Also check for typos and ensure paths with spaces are quoted.

Is it safe to use --no-sandbox?

No, not for normal browsing. It disables a critical security feature and should be reserved for isolated testing environments where the risk is understood.

Can I use command line switches to change Chrome's language?

Yes, the --lang switch sets the UI language for that session, for example --lang=fr. However, the language may be overridden by the profile's saved preference or by system settings.

Are command line switches the same on Windows, macOS, and Linux?

The switch names are generally the same, but the way you pass them differs because of how each operating system launches applications. The underlying Chromium code parses the same switch strings.