How to create a temporary profile in Google Chrome / Chromium

Chrome temporary profile

If from the title it is not clear to you what this article is about, I will quickly explain that the profile is the directory where the browser stores all your user data: bookmarks, extensions, settings, customizations, passwords, etc. Creating a new profile means that you can open a new browser window that will behave as if it were a different browser, with bookmarks, extensions and customizations totally independent of your normal profile.

Google Chrome, as well as other browsers, allows you to create as many profiles as you want and use them all at the same time if you want, and the interesting thing about the topic is that nothing you do in any of them will affect the others at all; they will behave practically as if they were different programs.

In this post we will see how to create a temporary profile in a simple way. A temporary or disposable profile is a profile that is created the moment you call it and it self-destructs as soon as you close the window. Some of the cases in which a temporary profile may be useful to you are:

  1. When you want to try an experimental or unreliable extension and you don't want to put the security of your main profile at risk.
  2. When you have several accounts on the same site (for example, several emails from gmail) and you want to enter all of them at the same time (one for each profile).
  3. When you are testing a website and you want to know how it looks without the extensions and customizations of your normal profile interfering.
  4. When someone asks your PC to navigate and you don't want them to access the information stored in the browser.

Among many other uses that you will surely know how to find.

Previously, to create a temporary profile in Google Chrome o Chromium it was enough to use the flag –Temp-profile; that is, we only had to execute this command:

google-chrome --temp-profile

And that was enough. However, for some reason that flag was withdrawn, unless the developers of Chrome decide to bring it back I have created a little method to replace it.


The first thing we will do is open our favorite text editor and paste the following lines:

#! /bin/bash
google-chrome --user-data-dir=$HOME/.$PROFILE

As we can see, it is a script who uses the $ RANDOM function to create a random hidden directory in the user folder, then launch Google Chrome (if you use Chromium you will have to replace google-chrome by chromium o chromium-browser according to the name it receives in your distro) adding the flag –User-data-dir to tell it to use the previously created directory as a profile, and finally destroy the directory when we have closed all browser windows.

We keep the script with the name we want; for example, chrome temp, then we enter the directory where it was saved through the console and give it execution permissions:

$ chmod a+x chrome-temp

Now we move it to the / usr / bin directory so we can easily invoke it:

# mv chrome-temp /usr/bin

And voila, we can launch Google Chrome in a temporary profile by typing chrome-temp & on the console.

If we want to make things even easier, we can create a shortcut to launch it like any other program. For this we open the text editor again and paste these lines:

[Desktop Entry] Version=1.0
Name=Google Chrome Temp

Where the important parts are:

  • Name = Name of the shortcut.
  • Exec = Name that you have given to the script.
  • Icon =google-chrome, chromium o chromium-browser.

We save that file on the desktop with a .desktop extension; for example, chrome-temp.desktop, and we already have a shortcut on the desktop to launch Google Chrome in a temporary profile.

Finally, we can copy it to the directory of shortcuts so that it also appears in the menus:

# cp chrome-temp.desktop /usr/share/applications

The result will look something like this (depending on the desktop environment you use, it may be necessary to log out and log back in for the shortcut to appear):


A characteristic of the script is that every time we click on the shortcut, a new temporary profile will be launched regardless of whether we already have another active at that time, and thanks to the function $ RANDOM, in theory we can create and use up to 32768 profiles at the same time; if it is our hardware holds so many thousands of windows open. 😀

The content of the article adheres to our principles of editorial ethics. To report an error click here!.

11 comments, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *



  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   st0rmt4il said

    What a tip! .. Added to Favorites ..

    When you see this wallpaper, are you in Manjaro or did you tune your archlinux to give it a manjaro aesthetic? - Correct me if I'm wrong!


    1.    Manual of the Source said

      It's Manjaro in Live mode. I used it just to take the screenshot because on my Arch I have LXDE with the default theme and I thought it would look too ugly. 😛

      Yes I have plans to steal some things from Manjaro, in a while I will install it and see how much I copy it. 😀

      1.    st0rmt4il said

        Hehehe .. Daleee company 😉

    2.    Caesar Salad said

      And is it possible to make this profile temporary in Windows?

  2.   cooper15 said

    Great contribution, I congratulate you, I will try it.

  3.   Damian rivera said

    Thanks for the tutorial, I didn't know that Chrom * had that parameter, I'll try it 😀

  4.   anzill3r said

    What interesting information, thank you 😀

  5.   Wisp said

    Very useful information.

    1.    Wisp said

      Especially to avoid intruders.

  6.   kuk said

    Personally I don't like Chrome very much but thank you very useful this information

  7.   Roger said

    Everything works, I liked it, very creative, but I have the disadvantage that to see a page, since it loads but cannot be seen, I must duplicate the tab and drag it so that it opens in a new window and there it can be seen. Something curious but maybe it will also happen to someone. I use Gnome-Ubuntu 14.04