Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How can this happen?

    jon@vaio:~/brickify$ /usr/bin/node -v
    v0.8.11
    jon@vaio:~/brickify$ echo $PATH
    /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
    jon@vaio:~/brickify$ node -v
    jon@vaio:~/brickify$

/usr/bin is in $PATH, so just writing node -v should work the same as writing /usr/bin/node -v

share|improve this question
2  
Does node exist in any other folder on the path? –  hexafraction Oct 12 '12 at 23:52
1  
which node will show you the path of the binary that's actually running when you do node without an absolute path. Like ObsessiveFOSS says, it's likely there's another node in the directories before /usr/bin. –  roadmr Oct 13 '12 at 0:24
1  
Is that dollar sign at the end of your path really there, or was it some sort of typo? It shouldn't actually be there, but if it is, it may cause problems with your path. –  Marty Fried Oct 13 '12 at 1:31
1  
@ObsessiveSSO: yes, it also exists in /usr/sbin... When I run /usr/sbin/node -v I get the same lack of output as when I run node -v. So that explains. But, why the node installation chose to set things up this way, still puzzles me. But that's another question. @roadmr: which node points to /usr/bin @MartyFried: The dollar sign was a typo –  loldrup Oct 14 '12 at 11:12
add comment

2 Answers

up vote 1 down vote accepted

You can see which version of a program is being invoked by using the which command, e.g.

which node
share|improve this answer
add comment
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games$

You have to remove the $ sign from end oth the PATH value

share|improve this answer
    
This was a typo, sorry –  loldrup Oct 14 '12 at 11:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.