如何查看正在运行的Chrome实例启动时使用的CLI开关?
Absolutely, there are straightforward ways to verify which command-line switches your running Chrome instance is using—whether you're on Windows, macOS, Linux, or just want a browser-native method. Here's how:
Chrome's Built-in Method (Cross-Platform)
This is the easiest way, no system tools required:
- Open Chrome and navigate to
chrome://version/ - Scroll down to the Command Line section—this line will show the full command that launched Chrome, including all CLI switches you passed.
Platform-Specific System Tools
Windows
- Task Manager:
- Open Task Manager (press
Ctrl+Shift+Esc) - Switch to the Details tab
- If you don't see the "Command line" column, right-click any column header and select Command line to enable it
- Look for the main
chrome.exeprocess (the one with the highest memory usage usually) to see the full launch command
- Open Task Manager (press
- PowerShell:
Run this command to get the command line for all Chrome processes:Get-WmiObject Win32_Process | Where-Object {$_.Name -eq "chrome.exe"} | Select-Object CommandLine
macOS
- Activity Monitor:
- Open Activity Monitor (found in Applications > Utilities)
- Search for "Chrome" in the top-right search bar
- Double-click the main Chrome process
- Go to the Open Files and Ports tab—you'll find the full launch command near the top
- Terminal:
Run this command to filter Chrome's process command lines (avoids matching the grep command itself):ps aux | grep -i "[c]hrome"
Linux
- Terminal:
Use either of these commands to get the full command line for Chrome processes:# Shows all Chrome processes with their full command lines pgrep -fa chrome # Alternative method ps aux | grep -i "[c]hrome"
A quick note: Chrome runs multiple processes (one for each tab, extension, etc.), but the main Chrome process will have the complete set of CLI switches you used to launch the browser. Subprocesses may inherit some flags but won't show the full initial command.
Once you check the command line, you'll be able to confirm if your intended CLI switches were actually passed to Chrome—this will help you narrow down whether the issue is with the switch itself or how you're launching the browser.
内容的提问来源于stack exchange,提问作者Tomáš Hübelbauer

