But I find that after one firefox instance under one profile is running, even I choose another profile during starting with
-P, the new instance is still running under the existing profile.
You can add the
-no-remote option when you start firefox and it will allow you to run firefox under multiple profiles at the same time.
By default, firefox will delegate a command to an already running instance.
-no-remote will disable this:
Don't connect to any other running instances of firefox. Use this if you want to run firefox in an entirely new process.
Check more on firefox manual.
To identify which profile you are running firefox under, the “Show Profile” plugin will be useful: