60

How can I find out what version of chrome I am using?

I would like a command line method, not the GUI - visiting chrome://chrome in the url bar. I need to be able to use it in a bash script.

I ran the command google-chrome --help, but it didn't seem to have a --version option.

3
  • How did you look for the version option in the help? Scrolling through? Does it not list the option if you do google-chrome --help | grep version?
    – Alaa Ali
    Aug 1, 2014 at 18:01
  • Probably, but most basic users won't which is why I asked and answered the question :) I missed it myself first time.
    – Tim
    Aug 1, 2014 at 18:12
  • 1
    Oh. I didn't notice this was a self answered question =D. My bad.
    – Alaa Ali
    Aug 1, 2014 at 18:14

5 Answers 5

74

It does have the option listed:

OPTIONS
       Google  Chrome has hundreds of undocumented command-line flags that are
       added and removed at the whim of the  developers.   Here,  we  document
       relatively stable flags.  

       ...

       --version
              Show version information.

So you can use the command google-chrome with the --version option:

google-chrome --version

gives:

    Google Chrome 36.0.1985.125

For the following commands, I am using grep and regex, because it is much more adaptable to changes in Google Chrome version format changes

To get just the version number run the following command:

google-chrome --version | grep -iE "[0-9.]{10,20}"

It gives:

    36.0.1985.125   

And this one:

google-chrome --version | grep -iE " [0-9]{1,3}.[0-9]{1,3}

gives you just the main version numbers.

    36.0

If you have beta installed:

Running this command:

google-chrome-beta --version

gives:

Google Chrome 37.0.2062.58 beta

And then there are the gui methods:

You can go to the following sites:

chrome://chrome

gives you this:

enter image description here

And

chrome://version

or

about:

Thanks Jeff Inventor Chrome OS.

gives this:

enter image description here

Google Chrome   36.0.1985.125 (Official Build 283153) 
OS  Linux 
Blink   537.36 (@177902)
JavaScript  V8 3.26.31.8
Flash   14.0.0.145
User Agent  Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36
Command Line    /opt/google/chrome/google-chrome --no-startup-window --flag-switches-begin --flag-switches-end
Executable Path /opt/google/chrome/google-chrome
Profile Path    /home/tim/.config/google-chrome/Default
Variations  e950616e-37fb3cc2
            c70841c8-4866ef6e
            3664a344-be9e69ba
            9e5c75f1-ad69ceb0
            24dca50e-837c4893
            ca65a9fe-91ac3782
            8d790604-9cb2a91c
            4ea303a6-3d47f4f4
            d8f57532-f23d1dea
            b2612322-f8cf70e2
            5a3c10b5-e1cc0f14
            244ca1ac-4ad60575
            5e29d81-f23d1dea
            3ac60855-486e2a9c
            246fb659-bca011b3
            f296190c-cdc3d902
            4442aae2-4ad60575
            ed1d377-e1cc0f14
            75f0f0a0-4ad60575
            e2b18481-a5822863
            e7e71889-e1cc0f14
            cbf0c14e-bf3e6cfd

My pronouns are He / Him

0
12

Below command will give the version details only:

google-chrome --product-version

Output:

78.0.3904.70
1
  • 2
    IFS='.' read major minor build patch < <(google-chrome --product-version); echo "${major}.${minor}"
    – user986805
    Oct 28, 2019 at 15:49
4

For a more generic solution you can use apt-cache policy, e.g.:

$ apt-cache policy google-chrome-stable
google-chrome-stable:
  Installed: 36.0.1985.125-1
  Candidate: 36.0.1985.125-1

This will work with all software installed through your package manager.

2
  • That gives 36.0.1985.125-1 0 what is the -1 0 at the end?
    – Tim
    Aug 2, 2014 at 9:47
  • 1
    @Tim That's the "debian revision". See here for more information. Aug 2, 2014 at 14:54
4
echo $(google-chrome --version | awk '{print $3}')

output:

78.0.3904.97
2

about: also works. It gives the full version info of the browser, Blink, Javascript, and Flash.

2
  • Yeah, that redirects to chrome://version/
    – Tim
    Aug 2, 2014 at 9:43
  • Have added into the main answer and linked yours for kudos.
    – Tim
    Aug 2, 2014 at 9:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .