Surprise: I don't need a new kernel to make to MMA notebooks independent [closed]

People seem to suggest that one needs to start a new kernel to keep multiple Mathematica (MMA) notebooks independent e.g. Kernel management link. But I did not do so and still found my two notebooks running independently.

I opened the first notebook and entered

x=2;


Then, in the second notebook, I entered

x+1


and it gave me

1+x


instead of '3' thereby indicating that the two notebooks are independent. When I go to 'Evaluation >> Quit Kernel', I find only one option 'Local' in both the notebooks indicating that both notebooks are using the same kernel 'Local'.

So, how can multiple notebooks run independently despite being on the same kernel?

• Are you looking for the CellContext "Notebook" setting in the Option Inspector window, which you can reach via the Advanced Preferences in the Preferences panel? Beware that while this splits context between notebooks, it doesn't mean you can execute code in one notebook while the other is doing stuff (like a long-running command) Jun 5 '19 at 14:01
• How are you opening your two notebooks? Could it be that you're really running two instances of the Front-End, which a separate "Local" kernel each? You can check the context setting as suggested by @CarlLange (you can also evaluate $Context in both notebooks and see whether it's the same), and you could start a computation in one notebook (like Pause[15]), and try to evaluate something in the second while this is still running (as @CarlLange said, the second evaluation should be blocked if it's the same kernel for both notebooks). Jun 5 '19 at 17:20 • Did you set Evaluation -> Notebook's Default Context -> Unique to this notebook? Jun 6 '19 at 17:38 • Lukas is right: it looks like you are running two separate instances of Mathematica. How do you know it's the same kernel? Did you check $ProcessID? Jun 7 '19 at 6:54
• Yes, I was running two separate instances of MMA. \$ProcessID showed two different numbers. Only when I start a new notebook by File>>New Notebook, the notebooks share the same variable name and the notebooks show the same ProcessID which was not the case for my above question. Thank you all. Jun 7 '19 at 15:58