What are all of the command line options for Google Chrome?

26,642

Solution 1

Google Chrome has these stable options. There are other non stable ones, but they can be added and removed whenever the developers want, so I haven't included them, to keep this up to date.

I have written the option, then example, then explanation.


--user-data-dir=DIR

google-chrome --user-data-dir=/home/tim/chromedatadir

This is used to tell google chrome where to save your data (bookmarks, history, anything peronalised to you). This is the way to create a new session - just running google-chrome simply opens a new tab. Use a directory you have just created. The default is ~/.config/google-chrome.


--app=URL

google-chrome --app=http://google.co.uk

This creates a new window with no tool bars - e.g. No bookmarks bar, or tab bar or omnibar. See the screenshot below (that is Google, I just have a custom background 1).

enter image description here


--incognito

google-chrome --incognito

Opens an incognito window.

Pages that you view in incognito tabs won’t stick around in your browser’s history, cookie store or search history after you've closed all of your incognito tabs. Any files that you download or bookmarks that you create will be kept.

As you can see (top right) all my extensions (except ad block, because I have enabled that) are disabled in incognito.

enter image description here


--proxy-server=host:port

google-chrome --proxy-server="socks5://foobar:66"

This specifies the HTTP/SOCKS4/SOCKS5 proxy server to use for requests. It overrides any environment variables or settings picked via the options dialog, via the GUI settings. An individual proxy server is specified using the format:

[<proxy-scheme>://]<proxy-host>[:<proxy-port>]

<proxy-scheme> is the protocol of the proxy server, and is one of the following 4:

"http", "socks", "socks4", "socks5"

--no-proxy-server

google-chrome --no-proxy-server

Disables the proxy server. Overrides any environment variables or settings picked via the GUI settings.


--proxy-auto-detect

google-chrome --proxy-auto-detect

Autodetect proxy configuration. Overrides any environment variables or settings picked via the GUI settings.


--proxy-pac-url=URL

google-chrome --proxy-pac-url=URL

Specify proxy auto configuration URL. Overrides any environment variables or settings picked via the GUI settings.


--password-store=<basic|gnome|kwallet>

google-chrome --password-store=gnome

Set the password store to use. The default is to automatically detect based on the desktop environment. basic selects the built in, unencrypted password store. gnome selects Gnome keyring. kwallet selects (KDE) KWallet. (Note that KWallet may not work reliably outside KDE.)


--version

google-chrome --version

(return Google Chrome 36.0.1985.143)

Shows version information.

Perhaps more useful is

echo 'google-chrome --version' | sed -nre "s/.* ([0-9.]+)/\1/p"

(return 36.0.1985.143)

As that returns just the version number, without Google Chrome at the beginning.

There is more information here about ways of manipulating the --version option.


1 Custom Google™ Background

Solution 2

You should be able to see these options on the man page:

man google-chrome

Solution 3

Looking for options not shown in the man page?

Here is an essential one to increase the size of everything in chrome.

--force-device-scale-factor=

Number to scale is attached to the equals sign with no spaces. Typically somewhere between 1.0-2.0

Example:

google-chrome-stable --force-device-scale-factor=1.25

The following link contains an extensive list switches/options available for chrome thank you Peter

Share:
26,642

Related videos on Youtube

Tim
Author by

Tim

My name is Tim. I've graduated from the University of Nottingham with a First Class Computer Science BSc with Hons. In my spare time I do computer programming, often C or JavaScript, but also shell scripts, and answering questions on Stack Exchange. I used to spend most of my time on Ask Ubuntu; now I mostly browse the HNQ or Meta Stack Exchange. If you want to contact me it's [email protected] Do you need a reliable VPS? Try Digital Ocean. Sign up with this link for $10 free. One of my favourite sites is Kiva.org, a micro-funding organisation that allows people to lend money via the Internet to low-income entrepreneurs and students in over 80 countries. Kiva's mission is “to connect people through lending to alleviate poverty.” With just $25 you can make a difference - and 99% of loans are paid back in full - so you can lend again and again!

Updated on September 18, 2022

Comments

  • Tim
    Tim over 1 year

    I use Google Chrome as my main browser, and I wanted to know what things I can do with it from command line - especially commands that you can't do with the GUI.

  • Hannu
    Hannu over 9 years
    --version: $ echo 'Google Chrome 36.0.1985.143' | sed -nre "s/.* ([0-9.]+)/\1/p" - grep is probably not what you meant here. :-)
  • Hannu
    Hannu over 9 years
    Yes, that is where. grep displays the line that matches, but you have (return 36.0.1985.143) which is not the full line - rather it looks as the output from sed ^-- as I wrote.
  • Hannu
    Hannu over 9 years
    Ahh... Sorry to confuse you. Note that I do not have Chrome installed so I used 'echo' to simulate the output - that is echo 'Google Chrome 36.0.1985.143' equals producing the same output as google-chrome --version - sorry! ;-)
  • Seek Truth
    Seek Truth almost 3 years
    @Tim Can you advise where to go to see ALL the options offered by chrome? Not just the ones on the man page?
  • Tim
    Tim almost 3 years
    @SeekTruth I expect you’d probably have to look at the code. They change quite regularly: I don’t even know if the list in my answer is up to date.
  • Seek Truth
    Seek Truth almost 3 years
    Thank you. I finally found it and posted in my answer below.