user5511259
user5511259

Reputation:

How can I open up chrome programatically from the bash shell?

I've learned how to kill it by simply using

pkill Chrome

but how do I open it in bash in OS X ?

Upvotes: 1

Views: 195

Answers (3)

arc.slate .0
arc.slate .0

Reputation: 428

You should not need the full path of open as bash already knows where to find this.

It also knows where to find Chrome.

However you do need the full path of Chrome:

open -a "Google Chrome" --args 'gmail.com' 

Upvotes: 0

l'L'l
l'L'l

Reputation: 47282

This should do it:

$ open -a "Google Chrome"

or

$ open -a Google\ Chrome

More information:

$ manx open

Upvotes: 1

arcee123
arcee123

Reputation: 243

You can use /usr/bin/open -a command to run your browser. adding --args will open the browser from the command line and go to the target URL

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

Upvotes: 1

Related Questions