How to Upgrade to Node.js v4 on Ubuntu
- November 12, 2015
I’ve recently upgraded to Node.js v4 on 3 different Ubuntu 14.04 LTS instances, from 0.10 and also from 0.12.
Although the version jump might look a bit scary, it was actually quite seamless. I figured going to v4 versus v5 at this stage would be better because it’s LTS (Long Term Support) so it’ll stay around for a while.
So here’s 2 commands that will do the upgrade on your Ubuntu:
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs
Then you can just run
nodejs -v to verify 🙂