1

From command line, how to open an URL in an existing Google Chrome window for a specific profile? By profiles, I mean https://linuxhint.com/use_multiple_profiles_simultaneously_google_chrome/.

Right now, if I simply do

open http://www.example.com

on Linux or

'C:\Users\xxx\Program Files\Google\Chrome\Application\chrome.exe' http://www.example.com

on Windows (from Windows Terminal), it will open the URL in whatever Chrome window that happens to be "in focus" or "at the top" of the multiple windows I opened for different profiles.

2 Answers 2

1

Use the --profile-directory option to specify which profile you want the URL to open in.

On macOS, this will open the URL example.com in Profile 3:

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --profile-directory="Profile 3" https://example.com/

On Linux or Windows it is the same, but you have to provide the correct path to the Chrome program.

You can view the profile directory name at the special URL chrome://version, here's a screenshot of where to find it.

If a profile has an email address associated with it, you can use --profile-email=your@addre.ss instead of --profile-directory.

0

On windows, i use the following code in CMD to open a specific page in a specific profile. in this example, it's the default profile, but you can replace it with "Profile 3" just as easily.

Start chrome /profile-directory="Default" "http://www.example.com"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.