I can open a url specifying 'chrome browser' from terminal
open -a 'Google chrome' https://en.wikipedia.org/wiki/Main_Page
How to open it in an incognito mode?
google-chrometerminal
I can open a url specifying 'chrome browser' from terminal
open -a 'Google chrome' https://en.wikipedia.org/wiki/Main_Page
How to open it in an incognito mode?
Best Answer
Use something like:
open -a "Google Chrome" --args --incognito "https://en.wikipedia.org/wiki/Main_Page"
Google Chrome accepts
--incognito
as a command-line option. To pass that option to the application viaopen
, specify it after the--args
flag.If Chrome isn't already open (since this was not specified whether the original questioner needed to launch it fresh or if it was already running),
-n
is also needed to start a fresh instance.In general,
man open
is your friend.