I am working on linux(ubuntu 64bit), and I have installed node using the tutorial: http://howtonode.org/how-to-install-nodejs.
Here, now when I am doing node --version, it shows the following output.
abhinav@abhinav:~/node$ node --version
abhinav@abhinav:~/node$ node
abhinav@abhinav:~/node$ node -v
As visible, it does not print anything. What could be the reason for this. Please help?
Try
abhinav@abhinav:~/node$ nodejs --version
Using nodejs -v
or nodejs --version
will serve your purpose, hopefully. In some cases, executable of node is mapped to nodejs
.
You can install nodejs by
sudo apt-get install nodejs nodejs-dev npm
And you can check the version by
nodejs --version
You should check your $PATH variables. Simply type $PATH in the console and examine the output. If /usr/local/bin/node isn't there (and its probably not) add to .bashrc (hidden in home folder) or .profile:
export PATH="/usr/local/bin/node"
This will tell bash where to look for the node binary.