How can I create a terminal command to open another user's profile in Chrome?
It takes me a long time to switch between them because I have a lot of users in Chrome.
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.Sign up to join this community
Testing with Google Chrome (85.0.4183.102), the following command in Terminal works for me:
open -na 'Google Chrome' --args --profile-directory="$PROFILE"
$PROFILEis the name of the profile you want to open, e.g.
"Profile 2", etc.
$PROFILEis the name of each folder for each user in: ~/Library/Application Support/Google/Chrome/
If you want to get details of each profile, you can use the third-party utility
jq to parse the ~/Library/Application Support/Google/Chrome/Local State file in Terminal, e.g.:
jq .profile ~/Library/Application\ Support/Google/Chrome/Local\ State
You can then look at the output for e.g.
"Profile 2", etc. and under each profile you'll see info for e.g.
"user_name": to ascertain which profile belongs to whom.
jq from https://stedolan.github.io/jq/ and it was saved a
jq-osx-amd64 in my Downloads folder. I renamed it to
jq, made it executable with
chmod +x jq and moved it to
/usr/local/bin/ so it would be available in my