title: In linux, how to get the full path of a command I am using?
body: <p>How to get the full path of a command I am using?</p>
  
  <p>for example, I have installed jdk into <code>/opt/Oracle/jdk1.7.0_25</code>, and my <code>PATH</code> looks like this: </p>
  
  <pre><code>/opt/Oracle/jdk1.7.0_25/bin/:/usr/lib/x86_64-linux-gnu/qt4/bin:/home/unimous/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games. 
  </code></pre>
  
  <p>I want to get <code>/opt/Oracle/jdk1.7.0_25/bin/java</code> from <code>java</code>.</p>