Macos – How to open a URL in Google Chrome from the terminal in OS X

google-chromemacosterminal

How can I open a URL in Google Chrome from the terminal in OS X?

This is what I'm trying:

/usr/bin/open -a "/Applications/Google Chrome.app" --args 'http://google.com/'

It focuses Chrome but does not open the URL.

Best Answer

If you remove the --args it seems to work fine, since --args can only affect things on first launch (it changes what main gets called with)