How to find the chrome browser version using terminal in MAC?

10,680

Solution 1

Your question says "in Linux/Mac". Looking at the issue you have it looks like you might be using a mac, in which case the google-chome binary will be hidden away in the Applications folder. On my mac, this works:

$ /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --version                                                                            
Google Chrome 59.0.3071.104 

If you're not using a mac, it could well be because the path to your google-chome binary isn't in your $PATH variable, so I'd either specify the complete path, or add the right path to $PATH.

Solution 2

I have tried in my terminal. It's working. Please check yours. Please make sure that you have installed google chrome, not chromium.

Update for Mac: Your Mac is not allowing google-chrome as an environment variable. So, you can't access from terminal or CLI. You may use simple hack,

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --version

Note: The command will be like that. Use according to your machine.

google-chrome --version

enter image description here

Share:
10,680
Prashanth Sams
Author by

Prashanth Sams

Author of Selenium Essentials O'Reilly | PacktPub | Amazon.in | Amazon.com | Amazon (Kindle) | Google | Barnes&Noble | Apple Store Selenium WebDriver, Appium, API, Locust, Cucumber, Docker, Helm, Kubernetes, Jenkins, Jenkins job-dsl, AWS, Git, Github, Gitlab, Ruby, Python, JavaScript, TypeScript, Groovy, Shell, Protractor, Java, Grafana, Prometheus, Datadog, Graphite, CasperJS, Behave, JBehave Blog: http://www.seleniumworks.com/ https://devopsqa.wordpress.com/ Skype: prashanth.sams Official Site: http://prashanthsams.com Twitter: https://twitter.com/prashanthsams GitHub: https://github.com/prashanth-sams LinkedIn: https://www.linkedin.com/in/prashanth-sams-58208953/ Google+: https://plus.google.com/u/0/104394276212961437513/posts Facebook: https://www.facebook.com/groups/selenimusers/

Updated on June 05, 2022

Comments

  • Prashanth Sams
    Prashanth Sams almost 2 years

    Tried the below; but nothing seems to work

    google-chrome --version
    
    google-chrome-stable --version
    
    chrome --version
    

    enter image description here

    Build: Version 58.0.3029.110 (64-bit)enter image description here

  • Prashanth Sams
    Prashanth Sams almost 7 years
    it failed to work in couple of my machines; i use MAC.. hope u notice the screenshot in the question
  • Mohammad Ashraful Islam
    Mohammad Ashraful Islam almost 7 years
    Is that chrome or chromium?
  • Prashanth Sams
    Prashanth Sams almost 7 years
    It's chrome browser
  • Mohammad Ashraful Islam
    Mohammad Ashraful Islam almost 7 years
    Ok. sounds great. let me check in Mac.I was using Linux in screenshot
  • Prashanth Sams
    Prashanth Sams almost 7 years
    it works!!!!! thank you!
  • Prashanth Sams
    Prashanth Sams almost 7 years
    Thanks @ashraful