How to run multiple instances of Google Chrome on Mac

A quick note on the use case

To have another Google Chrome instance (or many) running alongside your main instance allows you to separate accounts, plugins and bookmarks.

In this case I wanted to use a just-for-work Mac for personal use, but I didn’t want to mix bookmarks, plugins and accounts. I do have other devices in which I run Chrome with my Google account, and I do like the sync feature, but I don’t like the idea of syncing my personal data to the main instance of Chrome on this specific Mac as this is not its main use.

That said, here is a way of launching a separate instance of Google Chrome using the „—user-data-dir“ from the terminal.

Launching a new instance of Google Chrome from the Terminal

Let’s say you have Google Chrome installed at „/Applications/Google Chrome“ and let’s say you want to save your new profile in „/Users/your- user/Documents/Chrome-Personal“

To do that, you just have to run this command in your terminal:

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --user-data-dir=/Users/your-user/Documents/Chrome-Personal

After running the command for the first time the folder will be populated with all the required files and folders for your profile and all future data for this instance will be saved here. After the first launch that folder will look somewhat like this:

Now if you run your normal Chrome instance (the one in /Applications), you will see one configuration, and if you run the previous command again you will see your other configuration, all with different plugins, passwords, bookmarks and accounts.

Making an alias for the command

To laugh this second instance faster you may want to add an alias for such a command, let’s say personal_chrome.

For this, you have to edit your terminal profile and add the following:

alias personal_chrome="/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --user-data-dir=/Users/your-user/Documents/Chrome-Personal"

ZSH

If you are on macOS Catalina, then you should, by default, be using zsh (I recommend using it with the awesome ohmyzsh).

To add an alias to „zsh“ just edit or create your ~/.zshrc by adding the previous alias. After that you have to reload your profile by running

source ~/.zshrc

Bash

If you are running and older version of macOS, then „bash“ is the default shell. To add an alias you should edit or create your ~/.bashrc by adding the previous alias. Then reload your profile by running

source ~/.bashrc

After that you can just run personal_chrome in any new terminal, and you will be opening the new instance (you may add as many instances as you want).

Comments

Comments powered by Disqus