I am running Ubuntu 12.04, which came with Cmake v 2.8.7.I had need for a more current CMake, so I downloaded the source for 12.8.12.1, built, and installed it per directions.  The last step, make install I ran sudoed../bootstrapmakesudo make installNow I want to run it, but I find that the old version is still invoked when I execute cmake from the command line:jdibling@hurricane:/$ cd /; cmake --version; which cmakecmake version 2.8.7/usr/local/bin/cmakejdibling@hurricane:/$ Odd, I think.  So I su and try it from there:root@hurricane:~# cd /; cmake --version; which cmakecmake version 2.8.12.1/usr/local/bin/cmakeroot@hurricane:/# Why does which report the same directory, but cmake --version reports different versions?  How can I find where the new cmake was actually installed?As suggested, I ran type:jdibling@hurricane:/tmp/cmake-2.8.12.1$ type cmakecmake is hashed (/usr/bin/cmake)jdibling@hurricane:/tmp/cmake-2.8.12.1$ sudo su -root@hurricane:~# type cmakecmake is /usr/local/bin/cmakeroot@hurricane:~# 
'which' reports one thing, actual command is another
linux;ubuntu;command line;which
You should use the type command to know what is really under its name, i.e.:type cmakeThat might be an alias that run a different version of cmake, or a function with a similar behavior or finally a previously hashed command that in not any more the first one in your PATH, as you experienced.