Open Links in Specific Chrome Profiles on macOS

Published December 26, 2022

Reading time: 1 minutes.

Google Chrome has support for multiple profiles, but when you open URLs from shortcuts, like a Stream Deck or other macro, those links get opened in the most recently focused Chrome instance.

You can specify which profile to use by using the --profile-directory flag. However, the profile you specify needs to be the name of the directory on your disk, and this doesn’t match the name of the profile in Chrome. Because reasons.

To find your profile’s name on disk, open your profile in Google Chrome and then visit chrome://version/.

Find the value for Profile Path. It’ll look something like this:

Profile Path: /Users/YOUR_USERNAME/Library/Application Support/Google/Chrome/Profile 1

In this case, the profile name is Profile 1.

You have what you need to construct a command to open a URL in a specific profile. The command needs to be in the following form:

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --profile-directory="PROFILE NAME" https://THE_URL_YOU_WANT_TO_USE

Try it out. Open a new Terminal window and use the following command to open GMail using Profile 1:

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --profile-directory="Profile 1" https://gmail.com

You can now use that command in a script, or even as a button on your Stream Deck.

To do this for a different profile, repeat the process. Switch to the other profile in Chrome and visit chrome://version/ again. Find the name for this profile by looking at the Profile Path value. Then use the same command again.


I don't have comments enabled on this site, but I'd love to talk with you about this article on Mastodon, Twitter, or LinkedIn. Follow me there and say hi.


Liked this? I have a newsletter.