Managing the many hats I wear can get messy to manage digitally. Switching between applications and accounts dedicated to specific roles is fiddly, energy draining, and time consuming. Knowing others have this problem too, I’ve been exploring various ways to automate the switch between different contexts quickly.
Most contexts have a specific Google profile associated with it. Launching Chrome and then selecting a profile is silly. Even if it were straightforward to create a link to each profile, that still costs time in mouse movement and key strokes.
Adding an alias to include an alias per profile could work. First things first, there had to be a way to switch between multiple chrome profiles from a terminal. And there is.
Let’s open a specific Chrome profile from a command line in macOS
- While using the Chrome profile you want to launch, enter this in the omnibox / address bar to find the correct profile number.
- Open terminal and using this command below, update the profile to the number identified in step 1. This command assumes your installation path is the same as mine.
$ /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --profile-directory="Profile 1"
Bonus Let’s open a specific Chrome profile from a command line in macOS with specific URLs open
$ open --new -a "Google Chrome" --args "https://example.com" "https://bsidesorlando.org" "https://dianainiative.org" --profile-directory="Profile 3"
this file was created :
this file was last modified: