You can specify a port, so you choose a port number for each version; There are no predefined ports for python2 vs python3.
For instance:
ipython notebook --port=10000
will launch IPython using the default python interpreter on port 10000 . Then you can connect to this laptop by going to http://localhost:10000/tree .
Let's say that ipython2 starts IPython with python2.7, and ipython3 starts IPython with python3.4, you can start both IPythons with the commands:
ipython2 notebook --port=27272 ipython3 notebook --port=34343
If the page URL starts with localhost:27272 , then python 2.7 is running on the laptop, and if the URL starts with localhost:34343 then python 3.4 is running on the laptop.
Note that this in itself has nothing to do with the various versions of python. You can run two instances of IPython on different ports using the same interpreter.
If you want to start IPython using a specific interpreter, you can start it as a module using the -m switch:
python2.7 -m IPython notebook
therefore, you do not need to have ipython or ipython3 as recognized commands. You just need to be able to run two different interpreters.
Again: to understand which version of the interpreter you are using, you can simply look at the port number in the URL. Or you can check sys.version_info in the interpreter.
If you need to do this often, you may be interested in setting the port number parameter in the configuration file. I do not know if it is possible to have two different configuration files: one for python2 and one for python3. However, inside the file you can check the version and set the desired port number.