How do I start Chrome using a specified "user profile"?
The command line argument you're looking for is --profile-directory=Default
.
Here's the complete command line for Mac OS X:
open -a "Google Chrome" --args --profile-directory=Default
Note: The open
command therefore does not launch new instances, as many applications will not be able to deal with multiple instances running as the same user. However there's the -n
argument to do that anyway, but it may break the application.
And for Linux:
google-chrome --profile-directory=Default
It expects the internal names of the profiles: My second profile, named "Lemonade" by Chrome, would be --profile-directory="Profile 1"
.
Determine the profile name by trial and error, or looking in the Local State
file (see Justin Buser's answer).
On Mac OS X, the directories are located in ~/Library/Application Support/Google/Chrome
. In Linux they are located in ~/.config/google-chrome
. In Win7 they are located in %USERPROFILE%\AppData\Local\Google\Chrome\User Data
.
GUI method with proper icon (for Windows)
- Type
chrome://settings/
in address bar (orMenu
>Settings
) - Select
Customize your Chrome profile
option - Scroll to the bottom and toggle
Create desktop shortcut
Optional Switch to any other profile & repeat steps 1-4
This creates a shortcut icon to your profile with the correct picture in the icon too. You can drag multiple profiles to your Windows taskbar. The shortcut on Windows 7 icon points to
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --profile-directory="Default"
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --profile-directory="Profile 1"
and so on...
Another, albeit less convenient method of choosing which profile will launch is to edit the Local State file in the Chrome User Data directory and search for "last_used": if you change the value it lists to a different Profile that's the one that will open the next time you launch chrome normally (unless of course you're using the switch mentioned above).
I only mention this in case anyone is interested in a more in-depth solution, that Local State file contains a JSON formatted list of settings that some might find useful.
--profile-directory
is useless if you already have another profile opened or the last window you closed is attributed/was logged in with another profile.
I have app shortcuts with one profile. The apps shortcuts have --profile-directory="Profile 3"
plus the --app="..
The default profile shortcut has --profile-directory="Default"
.
Both profiles get messed up. Extensions and the default shortcut that I use for daily browsing.
I've just tested this with 4 profiles with Chrome Version 22.0.1229.94 m:
Respectfully, I think the confusion is this:
chrome.exe
without any switches, then this new instance that is launched will open with the profile of the very last Chrome window/instance that was closed.
--profile-directory
method, an instance/window with the appropriate login regardless of which window(s)/ instances/ profiles are currently running, and/or which was the last one shutdown.