MacOS – Find Google Chrome installation directory using Terminal

applicationscommand linemacos

How do I find the Google Chrome Installation Directory/Path using the command line?
Is Google Chrome always installed to the default path, the "/Applications/" folder?

I have tried the following commands. Can anyone suggest what I am doing wrong?

  1. locate "*Chrome.app"

    When i used this command it only search the DB entries of installed software.

  2. find / -type d -name "*Chrome.app"

    Lists all the files on the system.

How can I find only Google Chrome’s path using this command, or is there another way?

Best Answer

You can query for this kind of information using the Launch Services database to dump a list of all registered apps, then grep for the one you want (in this case Google Chrome), for example (using Mountain Lion 10.8.4):

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump | grep -i "google chrome"

gives me the output:

path:          /Applications/Google Chrome.app/
executable:    Contents/MacOS/Google Chrome
path:          /Applications/Google Chrome.app/Contents/Versions/27.0.1453.116/Google Chrome Helper.app/
executable:    Contents/MacOS/Google Chrome Helper