title: "cmake --version" points to /usr/bin/cmake while "which cmake" points to /usr/local/bin
body: <p>I am trying to upgrade cmake on my linux computer. Here is the command I used.</p>
  
  <p>Remove the old cmake:</p>
  
  <pre><code>sudo apt purge --auto-remove cmake
  </code></pre>
  
  <p>Download and extracted cmake-3.13.3.tar.gz from <a href="https://cmake.org/download/" rel="noreferrer">https://cmake.org/download/</a></p>
  
  <p>Then in the extracted cmake folder:</p>
  
  <pre><code>./bootstrap
  make 
  sudo make install 
  </code></pre>
  
  <p>when I did <code>cmake --version</code> it returns</p>
  
  <pre><code>bash: /usr/bin/cmake: No such file or directory
  </code></pre>
  
  <p>which indicates that no cmake executable exists in <code>/usr/bin</code>. However when I run <code>which cmake</code> it returns </p>
  
  <pre><code>/usr/local/bin/cmake
  </code></pre>
  
  <p>And that does exist.</p>
  
  <p>How do I have the command <code>cmake</code> point to <code>/usr/local/bin/cmake</code>?</p>
  
  <p>My <code>$PATH</code> shows </p>
  
  <p><code>/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin</code></p>
  
  <p>Edit: different from the other question since I know exactly where the cmake executable is just that <code>--version</code> and <code>which</code> have different effect.</p>