Debianterminalcaching可执行文件path?

看来,Debian 6.0.2.1terminalcaching可执行文件的path,这是避免新的可执行文件在同一个terminal上运行。 我想知道如果这是一个function,如果是这样,如何改变它。

这是我尝试的一个示例场景。 系统预装了python 2.6.6。 我打开了一个新的terminal,运行“python”。 现在,我下载了python 2.7.2,做了安装。 我validation了安装是成功的,PATH在/ usr / bin(其中python 2.6.6驻留)之前有/ usr / local / bin。 现在,当我运行“python”时,它总是执行python 2.6.6。 示例屏幕截图:

$ 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. >>> 

现在,我打开一个新的terminal并执行python。 它行为正确,并运行较新的2.7.2 python。

任何build议,如果这个“function”可以改变到正常的工作模式?

安装之后,有时需要给命令hash -r ,或者在新的可执行文件path有效之前,在某些shell中进行rehash