JulieBao
JulieBao

Reputation: 23

On macOS, how to open a new Chrome window instead of a new tab from terminal (i.e., Bash command)

I want to open a new Chrome window via a Bash command on macOS. I know how to do it via AppleScript like this way:

tell application "/Applications/Google Chrome.app"
    make new window
    activate
end tell

But how can I implement it using a simple bash command? Thanks.

Upvotes: 2

Views: 2642

Answers (1)

Rocky Zhang
Rocky Zhang

Reputation: 36

Try this one open -na "Google Chrome" --args --new-window

-a: specify the application
-n: open a new instance
--args: all arguments following it will be passed to the opened application

Upvotes: 2

Related Questions