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.

I'm trying to install node js onto Ubuntu so that I can run AngularJS. I'm not sure if I've installed it before so I ran sudo-apt get install node and once that is done I then run node --version but nothing is returned on my terminal.

jason@jason:~$ node --version
jason@jason:~$ 

How do I check if nodejs is installed?

share|improve this question
    
that worked for me –  Dipesh Kc Jan 13 '13 at 2:04
add comment

2 Answers

up vote 6 down vote accepted

Try

nodejs --version

(at least on my system the binary is called nodejs)

share|improve this answer
    
Thanks for the help. –  jason328 Dec 9 '12 at 21:36
add comment

you seriously do not want to use apt-get to install NodeJS on ubuntu.

ubuntu's way of packaging 3rd party software means that you will always get outdated versions unless you have very active maintainers or slow software dev cycles—both of which are not true for NodeJS and the NodeJS package maintainers. i just checked and it looks like apt-get install nodejs will give you a v0.6.19 install, which is from june 2012—as of september 2013, when NodeJS has already hit stable v0.10.18, with considerable internal changes.

one more reason you do not want to apt-get NodeJS is that the executable will be called nodejs, for the simple reason that in the vast global namespace that is a contemporary linux distro, node had already been assigned to a an unrelated software when NodeJS hit the scene.

you probably want to compile NodeJS yourself, or try out one of the binary packages they have for download on nodejs.org.

share|improve this answer
    
Good point! OP can also add node's actively maintained repo to repositories list as described in this post here: github.com/joyent/node/wiki/… –  Pawelmhm Sep 20 '13 at 16:23
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.