The user data directory contains profile data such as history, bookmarks, and cookies, as well as other per-installation local state.
Each profile is a subdirectory (often
Default) within the user data directory.
To determine the user data directory for a running Chrome instance:
Profile Pathfield. This gives the path to the profile directory.
The default location of the user data directory is computed by
Generally it varies by
is_chrome_brandedin GN args), and
The default location is in the local app data folder:
%LOCALAPPDATA%\Google\Chrome Beta\User Data
%LOCALAPPDATA%\Google\Chrome SxS\User Data
(The canary channel suffix is determined using
The default location is in the
Application Support folder:
~/Library/Application Support/Google/Chrome Beta
~/Library/Application Support/Google/Chrome Canary
(The canary channel suffix is determined using the
CrProductDirName key in the browser app's
The default location is in
(The beta and dev channel suffixes are determined from
$CHROME_VERSION_EXTRA, which is passed by the launch wrapper script.)
~/.config portion of the default location can be overridden by
$CHROME_CONFIG_HOME (since M61) or by
$XDG_CONFIG_HOME affects all applications conforming to the XDG Base Directory Spec, while
$CHROME_CONFIG_HOME is specific to Chrome and Chromium.
The default location is:
The default location comes from Context.getDir and is specific to the app.
The default location is inside the application support directory in the app sandbox.
On all platforms, the user data directory can be overridden by passing the
--user-data-dir command-line flag to the Chrome binary.
On Linux, the user data directory can also be overridden with the
$CHROME_USER_DATA_DIR environment variable.
--user-data-dir flag takes precedence if both are present.
A single Chrome instance cannot show windows on multiple X displays, and two running Chrome instances cannot share the same user data directory. Therefore, it's desirable for Chrome to have a separate user data directory when running inside a Chrome Remote Desktop (CRD) virtual session on a Linux host.
By default, CRD achieves this by setting
$CHROME_USER_DATA_DIR in the session. Unfortunately this means that inside the session we don't get separate defaults for different channels (Stable, Beta, Dev) or for Chrome vs. Chromium. This can lead to profile version errors (“Your profile can not be used because it is from a newer version of Google Chrome”).
Since M61, this can be solved by setting
$CHROME_CONFIG_HOME instead of
$CHROME_USER_DATA_DIR. Specifically, put the following in
export CHROME_CONFIG_HOME="$HOME/.config/chrome-remote-desktop/chrome-config" unset CHROME_USER_DATA_DIR . /etc/chrome-remote-desktop-session
Then restart the host by running:
On Mac OS X, you can create an application that runs Chrome with a custom
Open Applications > Utilities > Script Editor.
set chrome to "\"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome\"" set userdatadir to "\"$HOME/Library/Application Support/Google/Chrome Alt\"" do shell script chrome & " --user-data-dir=" & userdatadir & " > /dev/null 2>&1 &"
Modify as needed for your installation path, Chrome versus Chromium, and desired user data directory.
Save the script in your Applications directory with the file format “Application”.
Close the Script Editor, find your newly created application, and run it. This opens a Chrome instance pointing to your new profile.
If you want, you can give this application the same icon as Chrome:
On Windows and ChromeOS, the user cache dir is the same as the profile dir. (The profile dir is inside the user data dir.)
On Mac OS X and iOS, the user cache dir is derived from the profile dir as follows:
Library/Application Supportis an ancestor of the profile dir, the user cache dir is
Library/Cachesplus the relative path from
Application Supportto the profile dir.
Example (Mac OS X):
On Linux, the user cache dir is derived from the profile dir as follows:
~/.config, unless overridden by
$XDG_CONFIG_HOME. (This step ignores
~/.cache, unless overridden by
On Android, the user cache directory comes from Context.getCacheDir.