For automation purpose, is it possible to create new user profile for Google Chrome using terminal?

Also, after creation of new user profile can we start chrome with the created one?


Default google-chrome user profile data stored at ~/.config/google-chrome. If you want to create new profile then use command:

google-chrome --user-data-dir=test --first-run

It will create new profile data directory test. You can give any name to this directory and any location. It will keep cookies, history and all data relate to this user.
Next time if you want to use this profile then use command:

google-chrome --user-data-dir=test 

Or you can make it default browser also.

EDIT : Thank you @snoop for suggest

If you don't want to see default browser pop-up then you can use command:

google-chrome --user-data-dir=test --no-first-run --no-default-browser-check

It is discussed bug here.

  • During first run of user profile, it ask for Make Google Chrome the default browser, I mean pop-up comes, can we avoid that and directly open Chrome? – snoop Oct 4 '15 at 3:13
  • there is option --no-default-browser-check but it not working in my chrome. try if it is working in your . man google-chrome says ` Google Chrome has hundreds of undocumented command-line flags that are added and removed at the whim of the developers. Here, we document relatively stable flags` so may be remove or not working with me. you can find option here also peter.sh/experiments/chromium-command-line-switches – pl_rock Oct 4 '15 at 4:08
  • Seems like its a bug: code.google.com/p/chromium/issues/detail?id=348426. Workaround could be: google-chrome --user-data-dir=test2 --no-first-run --no-default-browser-check – snoop Oct 4 '15 at 4:20
  • sure, please add this. – snoop Oct 4 '15 at 4:26
  • @snoop thanks , i made change in answer that you suggest :)- – pl_rock Oct 4 '15 at 4:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.