Install Node.js on Ubuntu 16

May 7, 2016

Here's how to install Node.js on Ubuntu 16 and other versions.

sudo apt-get remove node nodejs
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install nodejs

The above hint, how to install specific versions, and more instructions are available here.

Related Posts

1 Comment

Comment September 7, 2016 by anonymous
thx for your post. question: why do you remove "nodejs" and then reinstall it? is using "sudo apt-get install nodejs" different from downloading off the https://deb.nodesource.com/setup_6.x? I ask because am trying to find the best way to install node and npm on Ubuntu 16.04 LTS. I use this: $ sudo apt-get install nodejs #=> v4.2.6 then, created a symbolic link for node, as many node.js tools use this name to execute, but i dont know if this is needed, if you download from the nodejs.org site. $ sudo ln -s /usr/bin/nodejs /usr/bin/node $ sudo apt-get install npm #=> v.3.5.2 in your post instructions, will you need a symbolic link? will this install npm as well? if so, which version? thx.