$Path Not Working

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

4

2 Answers

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

which node
/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

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Chloe Bennett

Chloe Bennett

Culture, Media & Entertainment Columnist

Chloe Bennett explores the intersection of pop culture, streaming entertainment, digital trends, and contemporary lifestyle. Her weekly commentary reaches thousands of culture enthusiasts.

Share this article
Twitter Facebook Pinterest