It appears that Debian 6.0.2.1 terminal caches path of executables, which is avoiding fresh executables to be run on the same terminal. I would like to know if this is a feature and if so, how to change it.
Here is a sample scenario that I tried. The system had pre-installed python 2.6.6. I opened a new terminal and ran 'python'. Now, I downloaded python 2.7.2, did make install. I validated that the installation was successful and PATH had /usr/local/bin before /usr/bin(where python 2.6.6 resides). Now, when I run 'python', it executes python 2.6.6 always. Sample screen capture:
$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
$ python
Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
$ which python
/usr/local/bin/python
$ `which python`
Python 2.7.2 (default, Aug 8 2011, 14:21:09)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
$ python
Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
Now, I open a new terminal and execute python. It behaves correctly and runs the newer 2.7.2 python.
Any suggestion if this 'feature' can be changed to normal working mode?