title: Modifying $PATH variable
body: <p>Trying to install node.js.</p>
  
  <p>Did <code>brew install node</code></p>
  
  <p>It seems to have worked. </p>
  
  <p>However, received this message upon its completion </p>
  
  <blockquote>
    <p>Homebrew installed npm.<br>
    We recommend prepending the following path to your <code>PATH</code> environment<br>
    variable to have npm-installed binaries picked up:<br>
    <i>/usr/local/share/npm/bin</i></p>
  </blockquote>
  
  <p>Ok ... so, I open my <code>bash_profile</code>...</p>
  
  <p>And this is what I have in it:</p>
  
  <pre><code> export PATH="/usr/local/bin:/usr/local/sbin:~/bin:$PATH"
  
   [[ -s "$HOME/.rvm/scripts/rvm" ]] &amp;&amp; source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
  </code></pre>
  
  <p>Trying to understand how to modify it correctly so I won't ruin it ... </p>
  
  <p>Do I add <code>/usr/local/share/npm/bin</code> like this </p>
  
  <pre><code>export PATH="/usr/local/bin:/usr/local/sbin:~/bin/usr/local/share/npm/bin:$PATH"
  </code></pre>
  
  <p>If not, what is the correct way to add that path?</p>
  
  <p>Thank you for any help provided! </p>
  
  <p>PS. let me know if there is any additional information I could have provided</p>
  
  <p><strong>EDIT</strong> </p>
  
  <p>upon seeing <code>which npm</code> in macedigital's answer, I ran that ... </p>
  
  <p>and got this: <code>/usr/local/bin/npm</code> </p>
  
  <p>and that was before I did the second answer (ie, ThiefMaster's answer). </p>
  
  <p>ran <code>which npm</code> again ... </p>
  
  <p>and got the same answer as before ... </p>
  
  <p>i did echo <code>$PATH</code> and got this: </p>
  
  <blockquote>
    <p>/Users/name/.rvm/gems/ruby-1.9.3-p374/bin:/Users/name/.rvm/gems/ruby-1.9.3-p374@global/bin:/Users/name/.rvm/rubies/ruby-1.9.3-p374/bin:/Users/name/.rvm/bin:/usr/local/share/npm/bin:/usr/local/bin:/usr/local/sbin:~/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin:/usr/local/git/bin</p>
  </blockquote>
  
  <p>So, it looks like I already had it installed? </p>
  
  <p>Therefore, how do I handle the answers? I hate leaving it unresolved since both of you were so helpful and I feel bad that I asked without providing echo <code>$PATH</code> information since that would have told you that I had it installed ... </p>
  
  <p><strong>EDIT 2</strong></p>
  
  <p><code>ls -la /usr/local/share/npm/bin</code> gets this: </p>
  
  <blockquote>
    <p>ls: /usr/local/share/npm/bin: No such file or directory</p>
  </blockquote>
  
  <p><code>which -a npm</code> gets this: <code>/usr/local/bin/npm</code> </p>
  
  <p><strong>EDIT 3</strong></p>
  
  <p><code>ls -a /usr/local/bin/npm</code> gets this: <code>/usr/local/bin/npm</code></p>
  
  <p>there's no timestamp...</p>