User Agents

Web browsers and everyday web tech, explained

Chrome Command Line Arguments: Guide and Usage

· 4 min read · Browsers

In this article
  1. How Command Line Arguments Work
  2. How to Apply Arguments on Different OS
  3. Commonly Used Arguments and Examples
  4. Safety and Stability Considerations
  5. Comparing Flags vs. chrome://flags
  6. Frequently Asked Questions

Chrome command line arguments are specific flags or switches added to the browser's launch command to modify its behavior, enable hidden features, or troubleshoot performance issues. These arguments allow users and developers to bypass standard menu settings and control the browser's internal engine directly from the operating system's terminal or shortcut properties.

How Command Line Arguments Work

When you launch Google Chrome, the operating system executes a binary file. By adding a space after the executable path followed by a specific flag (e.g., --incognito), you pass a parameter to the Chromium engine. The browser reads these flags during the initialization process and adjusts its configuration before the user interface fully loads.

Most arguments are categorized into three types:

  • User-facing flags: These change visible behavior, such as starting the browser in a specific mode.
  • Developer flags: These are used for debugging web pages, inspecting network traffic, or simulating different hardware environments.
  • System flags: These control how Chrome interacts with the OS, such as GPU acceleration or memory management.

How to Apply Arguments on Different OS

The method for applying these flags varies depending on your operating system. Because these arguments must be present at the moment the process starts, you cannot simply type them into the address bar.

  1. Windows: Right-click the Chrome shortcut on your desktop and select "Properties." In the "Target" field, go to the end of the path (after chrome.exe"), add a space, and type your desired argument. Click "Apply" and launch Chrome using that shortcut.
  2. macOS: Open the "Terminal" app. Type /Applications/Google\ Chrome.app/Contents\MacOS/Google\ Chrome [argument] and press Enter.
  3. Linux: Open a terminal and type google-chrome [argument] or chromium-browser [argument] depending on the installed version.

Commonly Used Arguments and Examples

While there are hundreds of flags, a few are particularly useful for general users and developers. Note that most flags start with a double hyphen (--).

  • --incognito: Launches the browser directly into Incognito mode, preventing the saving of browsing history and cookies.
  • --disable-extensions: Starts Chrome without any extensions enabled. This is the primary method for determining if a buggy extension is causing a website to crash.
  • --start-maximized: Forces the browser window to open in full-screen maximized mode on Windows.
  • --disable-gpu: Disables hardware acceleration. This is essential for troubleshooting "black screen" issues or flickering graphics caused by incompatible drivers.
  • --user-data-dir="[path]": Allows you to specify a custom folder for the user profile. This is useful for running multiple independent instances of Chrome with different settings and accounts simultaneously.
  • --headless: Runs the browser without a graphical user interface. This is used by developers to run automated tests or scrape data without rendering a window.

Safety and Stability Considerations

Using command line arguments can potentially destabilize the browser if used incorrectly. Because many of these flags are intended for the Chromium development team, they may bypass certain security checks or disable essential stability features.

Users should be aware of the following risks:

  • Security Degradation: Some flags can disable the "sandbox," which is the primary security layer that prevents malicious websites from accessing your local files. Never use --no-sandbox unless you are in a controlled development environment.
  • Performance Hits: Disabling the GPU (--disable-gpu) can significantly slow down the rendering of complex websites and videos, as the CPU must handle all graphical processing.
  • Version Obsolescence: Google frequently updates Chrome. A flag that worked in version 110 might be deprecated or removed in version 120. If a flag stops working, it has likely been integrated into the main settings or removed for security reasons.

Comparing Flags vs. chrome://flags

It is common to confuse command line arguments with the chrome://flags internal page. While both modify browser behavior, they serve different purposes.

The chrome://flags menu is a graphical interface for "experimental" features. When you enable a flag here, Chrome saves that preference in your user profile, and it persists across all restarts. In contrast, command line arguments are session-specific. If you launch Chrome via a shortcut with --disable-extensions, that setting only applies to that specific window. Once you close it and open Chrome normally, the extensions will return.

Frequently Asked Questions

Can I use multiple arguments at once?

Yes, you can combine as many arguments as needed. Simply separate each flag with a space. For example, --incognito --disable-gpu --start-maximized will launch a maximized, GPU-disabled window in Incognito mode.

Why does the shortcut not work after adding a flag?

The most common cause is a missing space between the closing quotation mark of the file path and the start of the flag. Ensure there is exactly one space before the -- symbol.

Will these arguments update automatically?

No. Command line arguments are static text strings. If a flag becomes obsolete due to a Chrome update, the browser will simply ignore it without notifying you.

Is it safe to use --no-sandbox?

No, it is generally unsafe. The sandbox is a critical security feature that isolates the browser process from the rest of the operating system. Disabling it makes your system vulnerable to exploits from malicious websites.

How do I remove the arguments?

On Windows, return to the shortcut Properties and delete the flags from the "Target" field. On macOS and Linux, simply stop using the flags when typing the command in the terminal.